﻿:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --line: #e2e8f0;
  --code: #0f172a;
  --code-bg: #e2e8f0;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.75; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; backdrop-filter: blur(10px); z-index: 10; }
.navbar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 24px; }
.logo { font-weight: 800; color: var(--text); font-size: 20px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 600; }
.hero { padding: 72px 0 42px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 32px; align-items: center; }
.kicker { color: var(--brand); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; margin: 12px 0 20px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 720px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 999px; background: var(--brand); color: white; font-weight: 700; }
.button.secondary { background: white; color: var(--text); border: 1px solid var(--line); }
.stat-card { background: linear-gradient(135deg, #dbeafe, #fff); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: 0 20px 50px rgba(15,23,42,.08); }
.stat { margin: 12px 0; }
.stat strong { display: block; font-size: 32px; }
.section { padding: 34px 0; }
.section h2 { font-size: 30px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(15,23,42,.04); }
.card h3 { margin-top: 8px; line-height: 1.35; }
.meta, .tagline { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; margin: 6px 6px 0 0; padding: 3px 9px; border-radius: 999px; background: #eff6ff; color: #1e40af; font-size: 13px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 740px) 280px; gap: 42px; padding: 42px 0; align-items: start; }
.article { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 4vw, 44px); }
.article h1 { font-size: clamp(30px, 4vw, 46px); }
.article h2 { margin-top: 34px; font-size: 25px; }
.article pre { overflow-x: auto; background: var(--code); color: #e5e7eb; padding: 18px; border-radius: 14px; }
.article code { background: var(--code-bg); padding: 2px 5px; border-radius: 5px; }
.article pre code { background: transparent; padding: 0; }
.sidebar { position: sticky; top: 92px; }
.footer { margin-top: 48px; padding: 36px 0; border-top: 1px solid var(--line); color: var(--muted); }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.list { display: grid; gap: 18px; }
.notice { padding: 16px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 16px; color: #9a3412; }
@media (max-width: 860px) { .hero-grid, .article-layout, .grid { grid-template-columns: 1fr; } .sidebar { position: static; } .navbar { align-items: flex-start; flex-direction: column; padding: 16px 0; } }
.ad-slot { margin: 24px 0; padding: 22px; border: 1px dashed #93c5fd; background: #eff6ff; border-radius: 18px; text-align: center; color: #1e40af; font-size: 14px; }
.search-box { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 17px; margin: 16px 0 24px; }
.ad-slot-live { background: transparent; border-style: solid; min-height: 120px; }
.ad-slot-placeholder { cursor: pointer; }
.ad-slot-placeholder:hover { background: #dbeafe; }
.hero h1 { letter-spacing: -0.035em; }
.nav a.tag { background: #eef2ff; color: #3730a3; padding: 4px 10px; border-radius: 999px; }
.card a { font-weight: 700; }
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; overflow: hidden; border-radius: 12px; }
.article th, .article td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.article th { background: #f1f5f9; text-align: left; }
.article blockquote { border-left: 4px solid var(--brand); margin: 18px 0; padding: 8px 18px; background: #eff6ff; border-radius: 12px; color: #1e3a8a; }
.footer a { color: var(--muted); }
@media (max-width: 640px) { .hero { padding-top: 42px; } .card { padding: 18px; } }


.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 32px 0 4px; }
.page-link { min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--text); font-weight: 700; }
.page-link:hover { border-color: var(--brand); text-decoration: none; }
.page-link.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-link.disabled { color: var(--muted); background: #f1f5f9; cursor: not-allowed; }
.page-ellipsis { color: var(--muted); padding: 0 4px; }
.back-to-top { position: fixed; right: 22px; bottom: 24px; width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-size: 22px; font-weight: 800; box-shadow: 0 12px 30px rgba(37,99,235,.28); z-index: 20; }
.back-to-top:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
html { scroll-behavior: smooth; }
@media (max-width: 640px) { .back-to-top { right: 14px; bottom: 16px; width: 40px; height: 40px; } .pagination { justify-content: flex-start; } }

/* Refined pagination and back-to-top controls */
.pagination {
  margin: 42px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pagination-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.88));
  box-shadow: 0 18px 48px rgba(15, 23, 42, .09), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.page-link {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.page-link:hover {
  transform: translateY(-1px);
  border-color: rgba(37,99,235,.18);
  background: #eff6ff;
  color: var(--brand);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(37,99,235,.11);
}
.page-link.current {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 12px 26px rgba(37,99,235,.28);
}
.page-link.disabled {
  color: #94a3b8;
  background: #f8fafc;
  border-color: rgba(226,232,240,.9);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}
.page-prev,
.page-next {
  min-width: 96px;
}
.page-arrow {
  font-size: 22px;
  line-height: 0;
  margin-top: -1px;
}
.page-ellipsis {
  min-width: 24px;
  color: #94a3b8;
  font-weight: 900;
  text-align: center;
}
.page-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  min-width: 58px;
  height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #2563eb 58%, #4f46e5);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .30), inset 0 1px 0 rgba(255,255,255,.22);
  font-weight: 900;
  opacity: .94;
  backdrop-filter: blur(14px);
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.back-to-top:hover {
  transform: translateY(-2px);
  opacity: 1;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 24px 58px rgba(15, 23, 42, .36), inset 0 1px 0 rgba(255,255,255,.24);
}
.back-to-top span:first-child {
  font-size: 20px;
  line-height: 1;
}
.back-to-top-text {
  font-size: 13px;
  letter-spacing: .02em;
}
@media (max-width: 640px) {
  .pagination {
    align-items: stretch;
  }
  .pagination-card {
    width: 100%;
    border-radius: 20px;
    justify-content: space-between;
    gap: 4px;
  }
  .page-numbers {
    max-width: 46vw;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .page-numbers::-webkit-scrollbar {
    display: none;
  }
  .page-link {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
  }
  .page-prev,
  .page-next {
    min-width: auto;
  }
  .back-to-top {
    right: 14px;
    bottom: 16px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }
  .back-to-top-text {
    display: none;
  }
}
