/* 圈子列表页 */

.web-circles-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 12px;
}

/* ── Hero ── */
.web-circles-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 52%, #f1f5f9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 20px 52px rgba(15, 23, 42, 0.08);
}

html.web-theme-dark .web-circles-hero {
  background: linear-gradient(145deg, rgba(30, 27, 46, 0.98) 0%, rgba(24, 24, 27, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
}

.web-circles-hero::after {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(520px 240px at 0% 0%, rgba(99, 102, 241, 0.20), transparent 58%),
    radial-gradient(420px 200px at 100% 20%, rgba(37, 99, 235, 0.12), transparent 55%);
  pointer-events: none;
  animation: web-circles-hero-drift 24s ease-in-out infinite;
}

@keyframes web-circles-hero-drift {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 1; }
  50% { transform: scale(1.06) translate(-1%, 1%); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .web-circles-hero::after { animation: none; }
}

.web-circles-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.web-circles-hero__title {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--web-text, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}

.web-circles-hero__title .mdi {
  font-size: 1.15em;
  color: var(--web-brand, #2563eb);
  opacity: 0.92;
}

.web-circles-hero__desc {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--web-muted, #64748b);
  max-width: 52ch;
}

.web-circles-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: var(--web-text, #0f172a);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

html.web-theme-dark .web-circles-hero__back {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.web-circles-hero__back:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
  color: var(--web-text, #0f172a);
}

/* ── 搜索栏 ── */
.web-circles-search {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 8px 8px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

html.web-theme-dark .web-circles-search {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.10);
}

.web-circles-search__ico {
  font-size: 20px;
  color: var(--web-muted, #94a3b8);
  flex-shrink: 0;
  line-height: 1;
}

.web-circles-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--web-text, #0f172a);
  padding: 6px 0;
}

.web-circles-search__input::placeholder {
  color: var(--web-muted, #94a3b8);
}

.web-circles-search__btn {
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--web-brand, #2563eb), var(--web-brand-2, #6366f1));
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.web-circles-search__btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ── 列表区 ── */
.web-circles-panel {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.07);
  padding: clamp(16px, 2.5vw, 22px);
  backdrop-filter: blur(10px);
}

html.web-theme-dark .web-circles-panel {
  background: rgba(20, 26, 34, 0.88);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.web-circles-page-grid {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
}

.web-circles-page .web-circle-card {
  border-radius: 20px;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.web-circles-page .web-circle-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.14);
}

.web-circles-page .web-circle-media {
  aspect-ratio: 16 / 10;
  min-height: clamp(108px, 22vw, 148px);
  border-radius: 20px 20px 0 0;
}

.web-circles-page .web-circle-card-body {
  padding: 12px 14px 14px;
}

.web-circles-page .web-circle-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.web-circles-page .web-circle-sub {
  font-size: 13px;
  line-height: 1.45;
  white-space: normal !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-height: calc(1.45em * 2);
  min-height: 0 !important;
  flex: 0 0 auto !important;
  padding-top: 4px;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.web-circles-page .web-circle-foot {
  padding-top: 12px;
  border-top-style: solid;
  border-top-color: rgba(148, 163, 184, 0.18);
}

/* ── 空状态 / 加载更多 ── */
.web-circles-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  text-align: center;
  color: var(--web-muted, #64748b);
}

.web-circles-empty .mdi {
  font-size: 42px;
  opacity: 0.45;
  color: var(--web-brand, #2563eb);
}

.web-circles-empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.web-circles-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

.web-circles-hint {
  font-size: 13px;
  color: var(--web-muted, #94a3b8);
  min-height: 20px;
  text-align: center;
}

.web-circles-more {
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.03);
  color: var(--web-text, #0f172a);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

html.web-theme-dark .web-circles-more {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.web-circles-more:hover:not([data-loading="1"]) {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.web-circles-more[data-loading="1"] {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 576px) {
  .web-circles-hero__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .web-circles-hero__back {
    align-self: flex-start;
  }
  .web-circles-search {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .web-circles-search__btn {
    width: 100%;
    justify-content: center;
  }
}
