/* btdx1.com — compact directory-site layout after the btdx8 reference pages.
   Widths/colours are initial values (original CSS unavailable), see docs/design.md §3. */
:root {
  --page-bg: #e9e9e9;
  --panel: #fff;
  --text: #333;
  --muted: #888;
  --line: #e2e2e2;
  --link: #1d5c9b;
  --link-hover: #c00;
  --nav: #1f6db5;
  --nav-active: #0f4d8a;
  --nav-series: #6e6e6e;
  --accent: #e8590c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page-bg); color: var(--text); font: 14px/1.7 Arial, "Microsoft YaHei", "PingFang SC", SimSun, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
img { border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.clearfix::after { content: ""; display: table; clear: both; }

#top { background: #f7f7f7; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 30px; }
.t_container, #wrapper, #footer .wrap { width: 1020px; margin: 0 auto; }
.usercp, .usercpr { display: flex; flex-wrap: wrap; }
.usercp { float: left; }
.usercpr { float: right; }
.usercp li, .usercpr li { margin-right: 14px; }
.usercpr li { margin: 0 0 0 14px; }
.usercp a, .usercpr a { color: #555; }
.usercp a.current-menu-item { color: var(--link-hover); }

#wrapper { background: var(--panel); }
#header { display: flex; align-items: center; justify-content: space-between; padding: 18px 15px; }
#logo a { font-size: 30px; font-weight: bold; letter-spacing: 2px; color: var(--accent); }
#searchform { display: flex; }
#s { width: 300px; height: 32px; padding: 0 8px; border: 1px solid #bbb; border-right: 0; font-size: 13px; border-radius: 0; }
.searchsubmit { height: 32px; padding: 0 16px; border: 0; background: var(--nav); color: #fff; font-size: 14px; cursor: pointer; border-radius: 0; }
.searchsubmit:hover { background: var(--nav-active); }

.cat-menu { background: var(--nav); }
.cat-menu-series { background: var(--nav-series); }
.sf-menu { display: flex; flex-wrap: wrap; padding: 0 5px; }
.sf-menu a { display: block; padding: 0 12px; line-height: 35px; color: #fff; font-size: 14px; font-weight: bold; }
.sf-menu a:hover, .sf-menu .current-menu-item a { background: rgba(0, 0, 0, 0.22); color: #fff; }

#main { display: flex; gap: 20px; padding: 10px 15px 20px; align-items: flex-start; }
#content { flex: 1 1 700px; min-width: 0; }
#main.no-sidebar #content { flex: 1 1 auto; }
#sidebar { flex: 0 0 270px; }
#breadcrumb { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: #666; }

.post { padding: 15px 0; border-bottom: 1px dashed #ddd; }
.entry-thumb { float: left; margin-right: 15px; width: 100px; height: 130px; background: #eee; }
.entry-thumb img { display: block; width: 100px; height: 130px; object-fit: cover; }
.entry-title { margin: 0 0 4px; font-size: 16px; line-height: 1.5; }
.entry-meta { font-size: 12px; color: var(--muted); }
.entry-meta .meta-sep { margin: 0 6px; }
.entry-meta .score, .related .score { color: var(--accent); }
.entry-excerpt p { margin: 6px 0 0; font-size: 13px; color: #555; }
.empty, .error-page { padding: 40px 0; text-align: center; color: #666; }
.error-page h1 { font-size: 22px; color: var(--text); }

.wp-pagenavi { display: flex; flex-wrap: wrap; gap: 4px; padding: 18px 0 4px; font-size: 13px; }
.wp-pagenavi a, .wp-pagenavi span { padding: 3px 9px; border: 1px solid #ccc; color: #555; }
.wp-pagenavi a:hover { border-color: var(--nav); color: var(--nav); }
.wp-pagenavi .current { background: var(--nav); border-color: var(--nav); color: #fff; }
.wp-pagenavi .extend { border: 0; }

.widget { margin-bottom: 18px; border: 1px solid var(--line); }
.widget-title { margin: 0; padding: 0 10px; background: #f3f3f3; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 34px; }
.widget-posts { padding: 6px 10px; }
.widget-posts li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; line-height: 27px; border-bottom: 1px dotted #e6e6e6; }
.widget-posts li:last-child { border-bottom: 0; }
.top_number { display: inline-block; width: 22px; margin-right: 6px; background: #b5b5b5; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.topthree .top_number { background: var(--accent); }

.movie-title { margin: 12px 0; font-size: 20px; line-height: 1.4; }
.movie-info { display: flex; gap: 20px; }
.movie-poster { flex: 0 0 200px; width: 200px; height: 260px; object-fit: cover; background: #eee; }
.movie-facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 6px; margin: 0; font-size: 13px; align-content: start; }
.movie-facts dt { color: var(--muted); }
.movie-facts dd { margin: 0; overflow-wrap: anywhere; }
.movie-section h2 { margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--nav); font-size: 16px; }
.movie-section p { margin: 0 0 8px; }
.download-note { color: #666; }
.download-widget-wrap { margin-top: 10px; }
.download-widget-wrap iframe { display: block; width: 100%; min-height: 200px; border: 0; }
.download-widget-wrap iframe.is-modal-active { position: relative; z-index: 9999; }
.download-widget-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 9998; }
#download-widget-retry { margin-top: 8px; padding: 4px 12px; border: 1px solid #ccc; background: #f6f6f6; cursor: pointer; }
.related ul { columns: 2; column-gap: 20px; }
.related li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; line-height: 28px; }

#footer { padding: 18px 0; background: #3b3b3b; color: #bbb; font-size: 12px; text-align: center; }
#footer p { margin: 2px 0; }
#footer a { color: #ddd; }
.gotop { position: fixed; right: 16px; bottom: 24px; padding: 6px 8px; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 12px; }
.gotop:hover { color: #fff; background: rgba(0, 0, 0, 0.65); }

@media (max-width: 1040px) {
  .t_container, #wrapper, #footer .wrap { width: auto; }
}
@media (max-width: 767px) {
  #top { padding: 0 16px; }
  .usercp, .usercpr { float: none; }
  #header { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px; }
  #logo { text-align: center; }
  #searchform { width: 100%; }
  #s { flex: 1; width: auto; min-width: 0; }
  .sf-menu { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sf-menu a { white-space: nowrap; padding: 0 10px; }
  #main { flex-direction: column; padding: 8px 16px 16px; }
  #content, #sidebar { flex: 1 1 auto; width: 100%; }
  .entry-thumb, .entry-thumb img { width: 80px; height: 104px; }
  .entry-thumb { margin-right: 12px; }
  .entry-title { font-size: 15px; }
  .movie-info { flex-direction: column; align-items: center; }
  .movie-facts { width: 100%; }
  .related ul { columns: 1; }
}
