/* BP Shell v3 — full page redesign language (not just overlays) */

.bp-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 80px;
}

.bp-masthead {
  position: relative;
  overflow: hidden;
  margin: 0 0 20px;
  padding: 28px 28px 24px;
  border-radius: 24px;
  background:
    radial-gradient(900px 280px at 12% -20%, rgba(64, 169, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #0f6fd8 0%, #1890ff 48%, #36cfc9 120%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 111, 216, 0.22);
}

.bp-masthead h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.bp-masthead p {
  margin: 0;
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.9;
}

.bp-masthead .bp-mast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.bp-masthead .bp-mast-search {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  max-width: 560px;
}

.bp-masthead .bp-mast-search input {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
}

.bp-masthead .bp-mast-search button {
  height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: #0f6fd8;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bp-masthead .home-cta,
.home-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.bp-masthead .home-cta-primary { background: #fff; color: #0f6fd8; }
.bp-masthead .home-cta-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }

body.bp-shell .apply-wrap .side-card,
body.bp-shell .about-page .content-card,
body.bp-shell .al-wrapper .al-card,
body.bp-shell .al-cat-nav {
  background: #fff !important;
  border: 1px solid var(--bp-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--bp-shadow-soft) !important;
}

body.bp-shell .al-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px !important;
}

body.bp-shell .al-cat-tag {
  border-radius: 999px !important;
  padding: 7px 14px !important;
  background: rgba(24,144,255,.08) !important;
}

body.bp-shell .al-cat-tag.active {
  background: var(--bp-blue) !important;
  color: #fff !important;
}

.bp-panel {
  background: #fff;
  border: 1px solid var(--bp-line);
  border-radius: 20px;
  box-shadow: var(--bp-shadow-soft);
  padding: 18px 18px 16px;
  margin-bottom: 16px;
}

.bp-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bp-panel__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.bp-panel__head p {
  margin: 4px 0 0;
  color: var(--bp-muted);
  font-size: 12px;
}

.bp-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--bp-muted);
}

.bp-crumb a {
  color: var(--bp-blue);
  text-decoration: none;
}

.bp-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.bp-tile {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #f8fbff, #fff);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bp-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 144, 255, 0.25);
  box-shadow: var(--bp-shadow);
}

.bp-tile img,
.bp-tile .bp-tile-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef5ff;
}

.bp-tile h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.bp-tile p {
  margin: 0;
  font-size: 12px;
  color: var(--bp-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bp-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 144, 255, 0.08);
}

.bp-seg a,
.bp-seg button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--bp-muted);
  cursor: pointer;
  text-decoration: none;
}

.bp-seg a.is-on,
.bp-seg button.is-on,
.bp-seg a.active,
.bp-seg button.active {
  background: #fff;
  color: var(--bp-blue);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.12);
}

/* Remap legacy page shells into new language */
body.bp-shell .search-container,
body.bp-shell .detail-container,
body.bp-shell .ranking-shell,
body.bp-shell .about-container,
body.bp-shell .apply-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 80px;
}

body.bp-shell .search-section:not(.home-hero) {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 28px 24px !important;
  min-height: auto !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, #0f6fd8, #1890ff 55%, #36cfc9) !important;
  overflow: hidden;
}

body.bp-shell .search-section:not(.home-hero) .search-slogan {
  color: #fff !important;
  font-size: 28px !important;
  font-weight: 800 !important;
}

body.bp-shell .search-section:not(.home-hero) .search-subtitle {
  color: rgba(255, 255, 255, 0.88) !important;
}

body.bp-shell .search-result-header,
body.bp-shell .ranking-header-panel,
body.bp-shell .category-nav,
body.bp-shell .article-list-header {
  background: #fff;
  border: 1px solid var(--bp-line);
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--bp-shadow-soft);
}

body.bp-shell .search-result-title,
body.bp-shell .ranking-main-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: var(--bp-ink) !important;
}

body.bp-shell .search-tabs,
body.bp-shell .ranking-major-tabs,
body.bp-shell .nav-tabs,
body.bp-shell .ranking-subtabs {
  display: inline-flex !important;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 144, 255, 0.08);
}

body.bp-shell .search-tab,
body.bp-shell .ranking-major-tab,
body.bp-shell .ranking-subtab,
body.bp-shell .nav-tab {
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  color: var(--bp-muted) !important;
}

body.bp-shell .search-tab.active,
body.bp-shell .ranking-major-tab.active,
body.bp-shell .ranking-subtab.active,
body.bp-shell .nav-tab.active {
  background: #fff !important;
  color: var(--bp-blue) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.12);
}

body.bp-shell .sites-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 12px !important;
}

body.bp-shell .site-card {
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 14px !important;
  border-radius: 16px !important;
  border: 1px solid var(--bp-line) !important;
  background: linear-gradient(180deg, #f8fbff, #fff) !important;
  box-shadow: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

body.bp-shell .site-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 144, 255, 0.28) !important;
  box-shadow: var(--bp-shadow) !important;
}

body.bp-shell .main-content-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px !important;
  align-items: start;
}

body.bp-shell .preview-section,
body.bp-shell .info-section,
body.bp-shell .snapshot-history,
body.bp-shell .site-stats-card,
body.bp-shell .related-sites {
  background: #fff !important;
  border: 1px solid var(--bp-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--bp-shadow-soft) !important;
  padding: 16px !important;
}

body.bp-shell .preview-container,
body.bp-shell .site-screenshot {
  border-radius: 16px !important;
  overflow: hidden;
}

body.bp-shell .ranking-list .ranking-card,
body.bp-shell .ranking-item,
body.bp-shell .article-item,
body.bp-shell .article-card {
  border-radius: 16px !important;
  border: 1px solid var(--bp-line) !important;
  background: #fff !important;
  box-shadow: var(--bp-shadow-soft) !important;
}

body.bp-shell .apply-form,
body.bp-shell .friend-link-form,
body.bp-shell .about-content,
body.bp-shell .article-detail-card {
  background: #fff !important;
  border: 1px solid var(--bp-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--bp-shadow-soft) !important;
  padding: 22px !important;
}

body.bp-shell .apply-form input,
body.bp-shell .apply-form textarea,
body.bp-shell .friend-link-form input,
body.bp-shell .friend-link-form textarea {
  border-radius: 12px !important;
  border: 1px solid var(--bp-line) !important;
  background: #f8fbff !important;
}

@media (max-width: 960px) {
  body.bp-shell .main-content-wrapper {
    grid-template-columns: 1fr !important;
  }
  .bp-masthead { border-radius: 18px; padding: 22px 18px; }
}
