:root {
  --sidebar-bg: linear-gradient(180deg, #2b2f36 0%, #1f2329 100%);
  --sidebar-border: rgba(255,255,255,.06);
  --sidebar-text: rgba(255,255,255,.72);
  --sidebar-text-active: #ffffff;
  --body-bg: #f5f7fb;
  --card-border: #dde5ee;
  --card-bg: #ffffff;
  --card-hover-border: #cfd8e3;
  --text-main: #2d3748;
  --text-sub: #8b97a7;
  --title-color: #314055;
  --blue-soft: rgba(64, 123, 255, .10);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--body-bg);
  color: var(--text-main);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

a {
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
}

.sidebar-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 1040;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.03);
}

.sidebar-menu-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.logo-env {
  padding: 22px 22px 18px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  position: relative;
  width: 34px;
  height: 28px;
  flex: 0 0 34px;
}

.logo-mark span {
  position: absolute;
  left: 0;
  width: 28px;
  height: 8px;
  border-radius: 6px;
  background: #f8bf3c;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transform: skewX(-18deg);
}

.logo-mark span:nth-child(1) { top: 0; }
.logo-mark span:nth-child(2) { top: 9px; background: #f4f4f4; }
.logo-mark span:nth-child(3) { top: 18px; background: #d8dee9; }

.logo-title {
  color: #fff;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.logo-sub {
  color: rgba(255,255,255,.68);
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 1px;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 24px;
}

.main-menu li {
  margin: 0;
}

.main-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 22px;
  color: var(--sidebar-text);
  border-top: 1px solid var(--sidebar-border);
  transition: background-color .18s ease, color .18s ease, padding-left .18s ease;
}

.main-menu a i {
  font-size: 13px;
  opacity: .9;
}

.main-menu a:hover,
.main-menu a.active {
  color: var(--sidebar-text-active);
  background: rgba(255,255,255,.05);
  padding-left: 26px;
}

.main-content-area {
  margin-left: 270px;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(209, 217, 226, .8);
}

@media (min-width: 992px) {
  .topbar {
    background: transparent;
    backdrop-filter: none;
    border-bottom: 0;
  }
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 18px;
  padding: 0 28px;
}

.topbar-menu-btn {
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #fff;
  font-size: 22px;
  color: #5a6576;
}

.topbar-title-wrap {
  min-width: 0;
}

.topbar-title {
  color: var(--title-color);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
}

.topbar-subtitle {
  color: #8d98a9;
  font-size: 12px;
  margin-top: 4px;
}

.content-area {
  padding: 18px 28px 28px;
}

.search-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  margin-bottom: 24px;
}

.search-wrap .input-group-text {
  background: #fff;
  border-color: #dbe3ec;
  color: #7c8898;
}

.search-wrap .form-control,
.search-wrap .btn {
  min-height: 46px;
  border-color: #dbe3ec;
}

.search-wrap .form-control:focus {
  box-shadow: none;
  border-color: #b9c7d6;
}

.btn-search {
  min-width: 120px;
  background: #3f4b5b;
  color: #fff;
  border-color: #3f4b5b;
}

.btn-search:hover {
  background: #303948;
  border-color: #303948;
  color: #fff;
}

.category-section {
  margin-bottom: 28px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #445468;
  font-size: 20px;
  font-weight: 500;
}

.section-title i {
  color: #6e7c90;
  font-size: 17px;
}

.site-card {
  display: block;
  height: 100%;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px 16px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  box-shadow: 0 1px 2px rgba(30, 41, 59, .03);
}

.site-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.site-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
}

.site-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  background: #efe9e8;
  color: #8f6662;
  font-weight: 600;
  font-size: 17px;
}

.site-meta {
  min-width: 0;
}

.site-name {
  color: #253245;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-sub {
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-hidden {
  display: none;
}

.empty-section {
  display: none;
}

.mobile-sidebar {
  background: #1f2329;
  color: #fff;
}

.mobile-sidebar .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 18px 18px 14px;
}

.mobile-sidebar .offcanvas-body {
  padding: 12px 0 22px;
}

.go-top-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #343d4c;
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all .18s ease;
  z-index: 1045;
}

.go-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 1199.98px) {
  .section-title {
    font-size: 22px;
  }
}

@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 88px;
  }

  .main-content-area {
    margin-left: 0;
  }

  .topbar-inner {
    min-height: 72px;
    padding: 0 16px;
    justify-content: space-between;
    gap: 12px;
  }

  .content-area {
    padding: 16px;
  }

  .search-panel {
    padding: 16px;
    border-radius: 14px;
  }

  .section-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .site-card {
    padding: 14px;
  }
}

@media (max-width: 575.98px) {
  .search-wrap {
    flex-wrap: wrap;
  }

  .search-wrap .input-group-text,
  .search-wrap .form-control,
  .search-wrap .btn {
    width: 100%;
    border-radius: 12px !important;
  }

  .search-wrap .btn-search {
    min-width: 100%;
  }

  .site-card {
    border-radius: 16px;
  }

  .site-name {
    font-size: 16px;
  }

  .site-sub {
    font-size: 16px;
  }
}


.topbar-brand {
  min-width: 0;
  color: var(--title-color);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
}

.topbar-brand-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
