/* 团队官网首页样式 */
:root {
  --home-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --home-shadow: var(--site-shadow, 0 4px 24px rgba(15, 23, 42, 0.06));
  --home-shadow-hover: var(--site-shadow-hover, 0 12px 32px rgba(15, 23, 42, 0.12));
  --home-radius: 1rem;
  --home-accent: #667eea;
  --home-border: var(--site-border, rgba(15, 23, 42, 0.07));
}

/* ── Hero（背景区保持不变） ── */
#one-hero.hero-section {
  --hero-header-offset: 4rem;
  position: relative;
  width: 100% !important;
  height: auto !important;
  min-height: 100vh;
  margin-top: calc(var(--hero-header-offset) * -1);
  padding-top: var(--hero-header-offset);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0f172a;
  box-sizing: border-box;
}

#one-hero.hero-section::before {
  content: '';
  position: absolute;
  inset: -8%;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(22px) saturate(1.15) brightness(0.72);
  transform: scale(1.06);
  z-index: 0;
  pointer-events: none;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.hero-bg-img.is-loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.08) 38%, rgba(15, 23, 42, 0.55) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.35) 100%);
  z-index: 2;
  pointer-events: none;
}

#one-hero .hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: calc(100vh - var(--hero-header-offset));
}

.hero-badge {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  font-size: 0.875rem;
  padding: 0.5rem 1rem !important;
  border-radius: 2rem;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.hero-scroll-btn {
  border-radius: 2rem;
  padding: 0.6rem 1.5rem !important;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

/* ── 通用区块 ── */
.home-section {
  position: relative;
}

.home-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-section-header .section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-accent);
  background: rgba(102, 126, 234, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 0.75rem;
}

.home-section-header .section-desc {
  font-size: 1rem;
  color: var(--bs-secondary-color);
  max-width: 480px;
  margin: 0.75rem auto 0;
}

.section-heading {
  position: relative;
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--bs-body-color);
}

.section-heading::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--home-gradient);
  margin: 0.625rem auto 0;
  border-radius: 3px;
}

/* ── 服务特色 ── */
#one-hero-after {
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--home-border);
}

.service-card {
  position: relative;
  padding: 1.75rem 1.25rem;
  border-radius: var(--home-radius);
  background: var(--bs-body-bg);
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  height: 100%;
  text-align: center;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--home-gradient);
  opacity: 0;
  transition: opacity 0.25s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--home-shadow-hover);
  border-color: rgba(102, 126, 234, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card .service-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  transition: transform 0.25s;
}

.service-card:hover .service-icon {
  transform: scale(1.08);
}

.service-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--bs-body-color);
}

.service-card p {
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.service-card .service-icon.icon-amethyst { color: #7c3aed; background: rgba(124, 58, 237, 0.1); }
.service-card .service-icon.icon-flat { color: #0891b2; background: rgba(8, 145, 178, 0.1); }
.service-card .service-icon.icon-smooth { color: #059669; background: rgba(5, 150, 105, 0.1); }
.service-card .service-icon.icon-city { color: #d97706; background: rgba(217, 119, 6, 0.1); }

/* ── Hitokoto ── */
.home-hitokoto {
  background: linear-gradient(180deg, var(--bs-body-extra-light) 0%, var(--bs-body-bg) 100%);
}

.hitokoto-block {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  border-radius: var(--home-radius);
  background: var(--bs-body-bg);
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow);
}

.hitokoto-block::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-size: 3rem;
  line-height: 1;
  color: rgba(102, 126, 234, 0.2);
  font-family: Georgia, serif;
}

.hitokoto-block #hitokoto_text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--bs-body-color);
  margin-bottom: 1rem !important;
}

.hitokoto-block #hitokoto_from {
  font-size: 0.875rem;
  color: var(--bs-secondary-color) !important;
  font-weight: 500 !important;
}

/* ── 项目卡片 ── */
#one-versions {
  background: var(--bs-body-light);
}

.project-card {
  display: block;
  border-radius: var(--home-radius);
  overflow: hidden;
  background: var(--bs-body-bg);
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none !important;
  color: inherit;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--home-shadow-hover);
  color: inherit;
}

.project-card-media {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-media img {
  transform: scale(1.05);
}

.project-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
}

.project-card-body {
  padding: 1.25rem;
}

.project-card-body h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--bs-body-color);
  transition: color 0.2s;
}

.project-card:hover .project-card-body h4 {
  color: var(--home-accent);
}

.project-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--home-accent);
  background: rgba(102, 126, 234, 0.08);
  padding: 0.2rem 0.625rem;
  border-radius: 2rem;
  margin-bottom: 0.625rem;
}

.project-card-body .project-desc {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  line-height: 1.6;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 成员卡片 ── */
#one-features {
  background: var(--bs-body-extra-light);
}

.member-card {
  border-radius: var(--home-radius);
  overflow: hidden;
  box-shadow: var(--home-shadow);
  border: 1px solid var(--home-border);
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--home-shadow-hover);
}

.member-card-visual {
  flex: 0 0 50%;
  min-height: 0;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.member-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
}

.member-avatar-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: -2.25rem;
}

.member-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
  background: #fff;
}

.member-card-body {
  flex: 0 0 50%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.25rem 1.125rem;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

@supports not (backdrop-filter: blur(1px)) {
  .member-card-body {
    background: rgba(255, 255, 255, 0.88);
  }
}

.dark-mode .member-card-body,
html.site-dark .member-card-body {
  background: rgba(30, 41, 59, 0.72);
  border-top-color: rgba(255, 255, 255, 0.08);
}

@supports not (backdrop-filter: blur(1px)) {
  .dark-mode .member-card-body,
  html.site-dark .member-card-body {
    background: rgba(30, 41, 59, 0.88);
  }
}

.member-card .member-name {
  font-weight: 700;
  color: var(--bs-body-color);
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
}

.member-card .member-desc {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.875rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.member-card .member-actions {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
}

.member-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  color: var(--home-accent);
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.15);
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.member-action-btn:hover {
  background: var(--home-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* ── 快捷入口 ── */
.action-section {
  padding: 3rem 0 2.5rem;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--home-border);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.875rem;
  max-width: 640px;
  margin: 0 auto;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem 0.875rem;
  border-radius: var(--home-radius);
  border: 1px solid var(--home-border);
  background: var(--bs-body-bg);
  box-shadow: var(--home-shadow);
  cursor: pointer;
  text-decoration: none !important;
  color: var(--bs-body-color);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--home-shadow-hover);
  color: var(--bs-body-color);
}

.action-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: #fff;
}

.action-card-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.action-card-query .action-card-icon { background: linear-gradient(135deg, #198754, #20c997); }
.action-card-query:hover { border-color: rgba(25, 135, 84, 0.25); }

.action-card-join .action-card-icon { background: linear-gradient(135deg, #0d6efd, #667eea); }
.action-card-join:hover { border-color: rgba(13, 110, 253, 0.25); }

.action-card-qun .action-card-icon { background: linear-gradient(135deg, #e6a817, #f093fb); }
.action-card-qun:hover { border-color: rgba(230, 168, 23, 0.3); }

.action-card-admin .action-card-icon { background: var(--home-gradient); }
button.action-card {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-family: inherit;
}

/* ── 页脚 ── */
#page-footer.home-footer {
  border-top: 1px solid var(--home-border);
  background: var(--bs-body-extra-light);
  color: var(--bs-body-color);
}

.dark-mode #page-footer.home-footer,
html.site-dark #page-footer.home-footer {
  color: #bec8d5;
}

.dark-mode #page-footer.home-footer .border-top,
html.site-dark #page-footer.home-footer .border-top {
  border-color: var(--home-border) !important;
}

.home-footer-inner {
  padding-top: 0.5rem;
}

.home-footer .footer-icp .badge {
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 2rem;
}

.admin-entry-link {
  opacity: 0.55;
  transition: opacity 0.2s;
  font-size: 0.75rem;
}

.admin-entry-link:hover {
  opacity: 1;
}

/* ── Layer 弹窗外壳 ── */
.layui-layer.home-layer {
  border-radius: 1.25rem !important;
  overflow: hidden !important;
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  border: none !important;
  background: var(--bs-body-bg, #fff) !important;
}

.layui-layer.home-layer .layui-layer-content {
  overflow: hidden !important;
  height: 100% !important;
  box-sizing: border-box;
  padding: 0;
  border-radius: 1.25rem;
  position: relative;
  z-index: 1;
  background: var(--bs-body-bg, #fff);
}

.layui-layer.home-layer .layui-layer-content iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: none;
  background: transparent;
}

.layui-layer-shade {
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

html {
  scrollbar-gutter: stable;
}

html.layer-open {
  overflow: hidden;
}

html.layer-open body {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .hitokoto-block {
    padding: 1.5rem 1.25rem;
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
