/*
  Custom SEO-friendly visual refresh for bqgpc
  - Non-breaking: only overrides existing classes/selectors
  - No functional changes
*/

/* Theme variables */
:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --ink-900: #0f172a;
  --ink-800: #111827;
  --ink-700: #1f2937;
  --ink-600: #374151;
  --ink-300: #d1d5db;
  --ink-200: #e5e7eb;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --radius-6: 6px;
  --radius-8: 8px;
  --radius-10: 10px;
  --radius-12: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 14px rgba(2,6,23,0.08);
  --shadow-lg: 0 12px 24px rgba(2,6,23,0.12);
}

/* Base typography */
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink-700);
  background: var(--bg-page);
  line-height: 1.6;
}

a { color: var(--brand-600); text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { color: var(--brand-500); }

/* Layout containers */
.container.biqunaicc {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Top bar and header */
.topbar {
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--ink-800) 100%);
  color: var(--ink-200);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.topbar-con {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}
.topbar a { 
  color: var(--ink-200); 
  transition: color .15s ease;
  text-decoration: none;
}
.topbar a:hover { 
  color: #fff; 
}
.topbar-sethome, .topbar-addfavorite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-6);
  transition: background-color .15s ease;
}
.topbar-sethome:hover, .topbar-addfavorite:hover {
  background: rgba(255,255,255,0.1);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-right a {
  padding: 4px 12px;
  border-radius: var(--radius-6);
  transition: all .15s ease;
}
.topbar-right a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.site-header { 
  border-bottom: 1px solid var(--ink-300); 
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.96)); 
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}
.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-400), var(--brand-600));
  opacity: 0.3;
}
.header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 20px !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(249,250,251,0.95) 100%);
  border-radius: var(--radius-8);
  margin: 10px auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  max-width: 1200px;
  width: calc(100% - 40px);
  height: auto !important;
  position: relative;
}
.logo {
  flex-shrink: 0;
}
.logo a { 
  text-decoration: none !important; 
  color: var(--brand-600) !important; 
  font-weight: 700 !important; 
  font-size: 32px !important;
  transition: all .2s ease;
  text-shadow: 0 2px 4px rgba(37,99,235,0.15);
  display: inline-block !important;
  position: relative;
  padding: 8px 16px;
  border-radius: var(--radius-8);
  background: linear-gradient(135deg, rgba(37,99,235,0.05) 0%, rgba(59,130,246,0.05) 100%);
  float: none !important;
  height: auto !important;
  width: auto !important;
  line-height: 1.2 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}
.logo a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-8);
  padding: 1px;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .2s ease;
}
.logo a:hover {
  color: var(--brand-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.logo a:hover::before {
  opacity: 0.3;
}

/* Primary nav */
nav.site-nav { 
  background: linear-gradient(135deg, #ffe4e1 0%, #ffc0cb 100%); 
  box-shadow: 0 2px 8px rgba(255,182,193,0.3);
  border-radius: var(--radius-8);
  margin: 10px auto;
  max-width: 1200px;
  width: calc(100% - 40px);
  overflow: visible !important;
}
ul.nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 8px !important;
  padding: 12px 16px !important;
  margin: 0 !important;
  list-style: none !important;
  height: auto !important;
  width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
}
ul.nav > li {
  float: none !important;
  line-height: normal !important;
  margin: 0 !important;
}
ul.nav > li > a {
  display: inline-block !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-6) !important;
  color: #8b4a6b !important;
  border: 1px solid rgba(139,74,107,0.2) !important;
  background: rgba(255,255,255,0.5) !important;
  transition: all .2s ease !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  height: auto !important;
  overflow: visible !important;
}
ul.nav > li > a:hover { 
  background: rgba(255,255,255,0.8) !important; 
  border-color: rgba(139,74,107,0.4) !important; 
  box-shadow: 0 2px 8px rgba(139,74,107,0.2) !important;
  transform: translateY(-1px) !important;
  color: #6b2d4d !important;
}
ul.nav > li > a:active {
  transform: translateY(0) !important;
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  max-width: 600px;
  background: #fff;
  border: 2px solid var(--ink-200);
  border-radius: var(--radius-10);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all .2s ease;
}
.search-form:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 4px 16px rgba(37,99,235,0.2);
}
.input-text.input-key {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-8);
  background: transparent;
  font-size: 14px;
  transition: all .18s ease;
}
.input-text.input-key::placeholder {
  color: var(--ink-400);
}
.btn-tosearch {
  padding: 10px 24px;
  border-radius: var(--radius-8);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
  transition: all .2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-tosearch:hover { 
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-400) 100%); 
  box-shadow: 0 4px 12px rgba(37,99,235,0.4); 
  transform: translateY(-1px); 
}
.btn-tosearch:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
.input-text.input-key:focus { 
  outline: none; 
}

/* Section headers */
.layout-tit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  padding: 8px 0;
  border-bottom: 2px solid var(--ink-200);
  position: relative;
}
.layout-tit::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--brand-600);
  border-radius: 2px;
  display: inline-block;
}

/* Lists */
.txt-list li { line-height: 1.8; }
.txt-list-row3 li, .txt-list-row5 li { padding: 2px 0; }

/* Cards */
.tp-box { border: 1px solid #f3f4f6; border-radius: var(--radius-10); padding: 12px; background: var(--bg-card); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease; }
.tp-box:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.detail-box { border: 1px solid #f3f4f6; border-radius: var(--radius-12); padding: 16px; background: var(--bg-card); box-shadow: var(--shadow-sm); }
.imgbox img { border-radius: var(--radius-8); display: block; width: 100%; height: auto; object-fit: cover; }

/* Read page */
.word_read {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: var(--radius-12);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  font-size: 17px;
  line-height: 1.9;
}
.read_btn a {
  display: inline-block;
  margin: 6px 6px 6px 0;
  padding: 6px 10px;
  border-radius: var(--radius-6);
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  transition: all .18s ease;
}
.read_btn a:hover { background: var(--brand-100); border-color: var(--brand-200); box-shadow: var(--shadow-sm); }

/* Footer */
.footer { 
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--ink-800) 100%); 
  color: #9ca3af; 
  padding: 32px 0; 
  border-top: 3px solid var(--brand-600);
  margin-top: 40px;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.pc-footer { 
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.pc-footer p { 
  line-height: 2;
  font-size: 14px;
  color: #cbd5e1;
  margin: 0;
  letter-spacing: 0.5px;
}
.footer a { 
  color: #cbd5e1; 
  transition: color .15s ease;
  text-decoration: none;
}
.footer a:hover { 
  color: #fff; 
  text-decoration: underline;
}

/* Home page specific styles */
.novel_home .container.biqunaicc {
  padding-top: 24px;
  padding-bottom: 24px;
}

.novel_home .row {
  margin-bottom: 24px;
}

/* Home page layout card */
.novel_home .layout.layout2 {
  background: var(--bg-card);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow-md);
  padding: 0;
  overflow: hidden;
  transition: box-shadow .2s ease;
  width: 100% !important;
  float: none !important;
}

.novel_home .layout.layout2:hover {
  box-shadow: var(--shadow-lg);
}

/* Home page title */
.novel_home .layout2 .layout-tit {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  padding: 16px 20px;
  margin: 0;
  border: none;
  border-bottom: 2px solid var(--brand-400);
  display: flex;
  align-items: center;
  gap: 12px;
}

.novel_home .layout2 .layout-tit::before {
  content: "📚";
  width: auto;
  height: auto;
  background: none;
  font-size: 20px;
  display: inline-block;
}

.novel_home .layout2 .layout-tit::after {
  content: "";
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.2);
  margin-left: 12px;
}

/* Home page list */
.novel_home .txt-list {
  padding: 16px 20px;
  background: var(--bg-card);
}

.novel_home .txt-list-row5 li {
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-200);
  transition: background-color .15s ease, padding-left .15s ease;
  border-radius: var(--radius-6);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.novel_home .txt-list-row5 li:hover {
  background-color: var(--brand-50);
  padding-left: 8px;
}

.novel_home .txt-list-row5 li:last-child {
  border-bottom: none;
}

.novel_home .txt-list-row5 li a {
  color: var(--ink-700);
  font-size: 14px;
  transition: color .15s ease;
  text-decoration: none;
}

.novel_home .txt-list-row5 li a:hover {
  color: var(--brand-600);
  font-weight: 500;
}

.novel_home .txt-list-row5 .s1 {
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  width: auto !important;
  min-width: 75px;
}

.novel_home .txt-list-row5 .s2 {
  color: var(--ink-600);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.novel_home .txt-list-row5 .s2 a {
  color: var(--ink-700);
  font-weight: 500;
}

/* 隐藏章节名 */
.novel_home .txt-list-row5 .s3 {
  display: none !important;
}

.novel_home .txt-list-row5 .s4 {
  color: var(--ink-400);
  font-size: 12px;
  flex-shrink: 0;
  width: auto !important;
  text-align: left !important;
  white-space: nowrap;
  margin-right: 0 !important;
}

.novel_home .txt-list-row5 .s5 {
  color: var(--ink-400);
  font-size: 12px;
  flex-shrink: 0;
  float: none !important;
  margin-left: 0 !important;
  white-space: nowrap;
  margin-left: 8px;
}

/* Home page spacing */
.novel_home .site-main {
  min-height: 60vh;
}

/* Latest tags section */
.novel_home .layout3 {
  background: var(--bg-card);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow-md);
  padding: 0;
  overflow: hidden;
  margin-bottom: 24px;
}

.novel_home .layout3 .layout-tit {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  padding: 16px 20px;
  margin: 0;
  border: none;
  border-bottom: 2px solid #6d28d9;
  display: flex;
  align-items: center;
  gap: 12px;
}

.novel_home .layout3 .layout-tit::before {
  content: "🏷️";
  width: auto;
  height: auto;
  background: none;
  font-size: 20px;
  display: inline-block;
}

.novel_home .layout3 .layout-tit::after {
  content: "";
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.2);
  margin-left: 12px;
}

.novel_home .tag_news {
  padding: 16px 20px;
  background: var(--bg-card);
  height: auto !important;
  min-height: 70px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.novel_home .tag_news > a {
  display: inline-block;
  padding: 6px 12px;
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-6);
  font-size: 13px;
  text-decoration: none;
  transition: all .15s ease;
  line-height: 1.5;
}

.novel_home .tag_news > a:hover {
  background: var(--brand-100);
  border-color: var(--brand-400);
  color: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 隐藏空标签 - 使用JavaScript处理，这里先设置基础样式 */
.novel_home .tag_news > a {
  min-width: 0;
  min-height: 0;
}

/* 隐藏没有文本内容的标签 */
.novel_home .tag_news > a:empty {
  display: none !important;
}

/* 隐藏没有href或href为空的标签 */
.novel_home .tag_news > a:not([href]),
.novel_home .tag_news > a[href=""],
.novel_home .tag_news > a[href="#"] {
  display: none !important;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .input-text.input-key { min-width: 160px; }
  .header { flex-direction: column; align-items: stretch; }
  .novel_home .layout2 .layout-tit {
    font-size: 18px;
    padding: 12px 16px;
  }
  .novel_home .txt-list {
    padding: 12px 16px;
  }
}


