/* Apple Liquid Glass Override for BaoLog Theme */

/* ── Reset & Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --hover: #fbfbfd;
  --text: #1d1d1f;
  --text-body: #424245;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --text-4: #aeaeb2;
  --faint: #d2d2d7;
  --hairline: rgba(0,0,0,0.07);
  --accent: #0071e3;
  --accent-link: #0066cc;
  --heat: #ff6b00;
  --heat-bg: rgba(255,107,0,0.1);
  --live: #30d158;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --r-card: 18px;
  --r-panel: 22px;
  --sh-card: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
  --sh-panel: 0 1px 3px rgba(0,0,0,0.05), 0 14px 40px rgba(0,0,0,0.05);
  --sh-lift: 0 12px 32px rgba(0,0,0,0.1);
  --max-read: 720px;
  --max-grid: 1080px;
  --pad-x: 22px;
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}
a:hover {
  color: var(--accent-link);
}

/* ── Glass Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,245,247,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--hairline);
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}

.header-inner {
  max-width: var(--max-grid);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  color: var(--text);
}

.nav-search {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.nav-search:hover {
  background: rgba(0,0,0,0.08);
}

/* ── Hero ── */
.page-hero {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: clamp(36px,6vw,64px) var(--pad-x) clamp(20px,4vw,32px);
}
.page-hero h1 {
  font-size: clamp(27px,5vw,46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
}
.page-hero .lede {
  margin-top: 12px;
  font-size: clamp(15px,2.5vw,18px);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 560px;
}

/* ── Unified Panel List ── */
.panel {
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
  max-width: var(--max-grid);
  margin: 0 auto 24px;
}
.panel-row {
  display: block;
  padding: 16px clamp(17px,3vw,24px);
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}
.panel-row:hover {
  background: var(--hover);
}
.panel-row + .panel-row {
  border-top: 1px solid var(--hairline);
}
.panel-row-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text);
}
.panel-row-meta {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-row-meta .time {
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.badge-pinned {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}
.badge-today {
  background: var(--heat-bg);
  color: var(--heat);
  font-weight: 700;
}

/* ── Segmented Control ── */
.seg {
  display: inline-flex;
  background: rgba(0,0,0,0.05);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  max-width: var(--max-grid);
  margin: 0 auto 18px;
}
.seg-wrap {
  padding: 0 var(--pad-x);
  max-width: var(--max-grid);
  margin: 0 auto 18px;
}
.seg button {
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  transition: all .25s cubic-bezier(.25,.1,.25,1);
}
.seg button.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* ── Article Page ── */
.article-wrap {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.article-header {
  padding: clamp(28px,5vw,48px) 0 18px;
}
.article-header h1 {
  font-size: clamp(27px,5vw,38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}
.article-meta {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
}
.article-body {
  font-size: clamp(16px,2.4vw,18px);
  color: var(--text-body);
  line-height: 1.85;
}
.article-body p {
  margin: 0 0 1.2em;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px 0;
  box-shadow: var(--sh-card);
}
.article-actions {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform .15s, background .2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--sh-cta, 0 20px 54px rgba(0,113,227,0.24));
}
.btn-primary:hover {
  background: var(--accent-link);
  color: #fff;
}
.btn-secondary {
  background: rgba(0,0,0,0.05);
  color: var(--text);
}
.btn-secondary:hover {
  background: rgba(0,0,0,0.08);
}

/* ── Back / Related ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 32px 0 8px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
}
.back-link:hover {
  color: var(--text);
}

.related-wrap {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 var(--pad-x) 56px;
}
.related-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.related-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.related-list li {
  width: 100%;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
}
.related-list li:first-child {
  border-top: none;
}
.related-list a {
  color: var(--text);
  text-decoration: none;
}
.related-list a:hover {
  color: var(--accent);
}

/* ── Pagination ── */
.page-nav {
  max-width: var(--max-grid);
  margin: 0 auto;
  padding: 18px var(--pad-x) 56px;
  display: flex;
  justify-content: center;
}
.page-nav .btn {
  min-width: 120px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: rgba(245,245,247,0.6);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.footer-inner {
  max-width: var(--max-grid);
  margin: 0 auto;
  padding: 22px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}
.footer-inner a {
  color: var(--text-2);
  text-decoration: none;
}
.footer-inner a:hover {
  color: var(--text);
}

/* ── Sidebar / extras ── */
.baolog_side_nav {
  display: none !important;
}

/* ── Utilities ── */
.hide-sm {
  display: none;
}
@media (max-width: 680px) {
  .hide-sm { display: none !important; }
  .page-hero, .article-wrap, .related-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .site-footer {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ── Search form ── */
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-field {
  height: 36px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 14px;
  background: rgba(0,0,0,0.04);
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
}
.search-field:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.search-submit {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.search-submit:hover {
  background: var(--accent-link);
}

/* ── Search form ── */
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-field {
  height: 36px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 14px;
  background: rgba(0,0,0,0.04);
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
}
.search-field:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.search-submit {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.search-submit:hover {
  background: var(--accent-link);
}

/* ── Override Bootstrap container to Apple grid ── */
@media (min-width: 1080px) {
  .container {
    max-width: 1080px;
  }
}
@media (min-width: 800px) and (max-width: 1079px) {
  .container {
    max-width: 100%;
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* ── Sidebar ── */
.baolog_side_nav {
  list-style: none;
  padding: 6px;
  margin: 0 0 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  overflow: hidden;
}
.baolog_side_nav li {
  border-bottom: 1px solid var(--hairline);
}
.baolog_side_nav li:last-child {
  border-bottom: none;
}
.baolog_side_nav li a,
.baolog_side_nav li > div {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background .2s;
}
.baolog_side_nav li a:hover,
.baolog_side_nav li > div:hover {
  background: rgba(0,0,0,0.04);
  text-decoration: none;
}

/* ── Modal / share sheet ── */
.modal-content {
  border-radius: 22px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.modal-header {
  border-bottom: 0;
  padding-top: 18px;
}
.modal-footer {
  border-top: 0;
  padding-bottom: 18px;
}
.share-modal .close {
  font-size: 22px;
  line-height: 1;
  opacity: .6;
}
.share-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(0,0,0,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s, background .2s;
}
.share-logo:hover {
  transform: translateY(-1px);
  background: rgba(0,0,0,0.1);
  color: var(--text);
}

/* ── Related articles ── */
.related-wrap {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 18px;
  margin-top: 18px;
}
.related-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-list li {
  border-bottom: 1px solid var(--hairline);
}
.related-list li:last-child {
  border-bottom: none;
}
.related-list a {
  display: block;
  padding: 10px 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.related-list a:hover {
  color: var(--accent-link);
  text-decoration: none;
}

/* ── Back link / actions spacing ── */
.back-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent-link);
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover {
  text-decoration: underline;
}

/* ── Single article ── */
.article-wrap {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 26px 28px 22px;
  margin-bottom: 18px;
}
.article-header {
  margin-bottom: 18px;
}
.article-header h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.article-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
  display: inline-block;
}
.article-meta a {
  color: var(--text-2);
  text-decoration: none;
}
.article-meta a:hover {
  color: var(--accent-link);
  text-decoration: none;
}
.article-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.article-body > *:first-child {
  margin-top: 0;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 10px 0;
}
.article-body p {
  margin: 0 0 14px;
}
.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 22px 0 10px;
  font-weight: 600;
  color: var(--text);
}
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.back-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent-link);
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover {
  text-decoration: underline;
}
.article-tips {
  margin-top: 18px;
}
.article-tips-inner {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-2);
}

/* ── Related cards ── */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.related-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.related-item:hover {
  background: rgba(0,0,0,0.06);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--text);
}
.related-item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-item-meta {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

/* ── Comments ── */
.comment-body {
  margin-top: 18px;
}
.comment-input .form-control {
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
}
.comment-input .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
.comment-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 14px 16px;
  margin-top: 12px;
}
.comment-card .card-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.comment-card .avatar-1 {
  border-radius: 50%;
}
.comment-card .card-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.comment_submit {
  border-radius: 999px;
  border: none;
  padding: 10px 18px;
  font-weight: 600;
}
