﻿/* ============ 暗紫色鎏光 CSS 变量 ============ */
:root {
  --primary: #511a59;
  --primary-dark: #0d0418;
  --primary-light: #2d1b4e;
  --accent: #7c3aed;
  --accent-light: #8b5cf6;
  --accent-lighter: #a78bfa;
  --accent-pale: #c4b5fd;
  --accent-purple: #c026d3;
  --bg-section: #ede4f5;
  --bg-page: #f8f4fc;
  --text-dark: #3d1a78;
  --text-body: #e4d8f0;
  --text-muted: #d0bce4;
  --text-faint: #b89ed4;
  --card-bg: rgba(40, 18, 85, 0.65);
  --card-border: rgba(168, 85, 247, 0.2);
  --glow-border: rgba(168, 85, 247, 0.5);
  --shadow-primary: rgba(168, 85, 247, 0.15);
  --shadow-accent: rgba(192, 132, 252, 0.1);
  --glow-primary: rgba(168, 85, 247, 0.3);
  --glow-accent: rgba(192, 132, 252, 0.2);
  --glow-pale: rgba(233, 213, 255, 0.1);
}

html {
  scroll-behavior: smooth;
}

* {
   margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: #ddd0ea;
  line-height: 1.7;
  background: var(--bg-page);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ============ 导航栏 ============ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 2px 12px rgba(45,27,78,0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #fff;
  transition: background 0.2s;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.2);
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle-label span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

/* ============ 欢迎区 ============ */
.welcome {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 100px 20px;
}
.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(../image/bg_grassland.png) center/cover no-repeat;
  filter: blur(2px);
  z-index: 0;
  pointer-events: none;
}
.welcome::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
  pointer-events: none;
}
.welcome > * {
  position: relative;
  z-index: 2;
}
.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome-title {
  font-size: 7rem;
  font-weight: 800;
  background: linear-gradient(75deg, #1e0928 0%, #792281 50%, #2b217a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 8px;
  margin-bottom: 16px;
  animation: fadeScale 0.9s ease-out both;
}
@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.welcome-divider {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 12px;
  animation: slideUp 0.7s ease-out 0.15s both;
  opacity: 0.7;
}
.welcome-slogan {
  font-size: 1.15rem;
  color: #a68cf2;
  max-width: 600px;
  margin: 0 auto 24px;
  display: inline-block;
  text-align: left;
  animation: slideUp 0.7s ease-out 0.3s both;
}
.welcome-stats {
  font-size: 1rem;
  font-weight: 600;
  color: #b096e7;
  display: inline-block;
  animation: slideUp 0.7s ease-out 0.6s both;
}

/* ============ 通用 Section ============ */

.section {
  padding: 72px 40px;
  position: relative;
  background: url(../image/menu_bg.jpg) center/cover no-repeat fixed;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(40, 8, 60, 0.35);
  z-index: 0;
  pointer-events: none;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 36px;
  padding-left: 16px;
  border-left: 5px solid var(--accent);
}

/* ============ 项目简介 ============ */

#academies,
#organization,
#roles,
#gallery {
  scroll-margin-top: 15vh;
}

#footer {
  scroll-margin-top: 0;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.9;
  max-width: 760px;
  padding: 32px 36px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.about-text p {
  margin-bottom: 18px;
  line-height: 1.85;
}

.about-text strong {
  color: var(--accent);
}

/* ============ 学院卡片 ============ */

.academy-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.academy-card {
  flex: 1 1 280px;
  max-width: 320px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 3px 16px rgba(124,58,237,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.academy-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
}

.academy-card:nth-child(1)::before { background: var(--accent); }
.academy-card:nth-child(2)::before { background: var(--accent-purple); }

.academy-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(124,58,237,0.12);
}

.academy-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.academy-card h3 {
  font-size: 1.25rem;
  color: #e9d5ff;
  margin-bottom: 4px;
}

.academy-count {
  font-size: 0.9rem;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.academy-birth {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.academy-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============ 女仆团网络 ============ */

.network-quote {
  max-width: 720px;
  padding: 28px 32px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
}

.network-quote::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 3rem;
  color: rgba(168,85,247,0.15);
  line-height: 1;
  font-family: Georgia, serif;
  pointer-events: none;
}

.network-sub {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  max-width: 720px;
}

.network-sub-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 6px;
}

.network-sub-info {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.network-sub-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.network-status {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}

/* ============ 身份组（树状图 + 详情卡片） ============ */

/* -- 树状图 -- */

.tree-chart {
  text-align: center;
  padding: 24px 0 32px;
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.tree-root-node {
  display: inline-block;
  padding: 10px 36px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 10px;
  color: #c084fc;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 3px;
  margin-bottom: 28px;
  position: relative;
  cursor: default;
}

.tree-root-node::after {
  content: "";
  position: absolute;
  bottom: -28px;
  left: 50%;
  width: 2px;
  height: 28px;
  background: rgba(168,85,247,0.2);
}

.tree-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  position: relative;
}

.tree-row::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: rgba(168,85,247,0.2);
}

.tree-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-top: 24px;
  min-width: 0;
}

.tree-col::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 2px;
  height: 24px;
  background: rgba(168,85,247,0.2);
}

.tree-branch-label {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 12px;
  background: rgba(168,85,247,0.06);
  color: var(--accent-lighter);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.tree-node {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: #e9d5ff;
  position: relative;
  white-space: nowrap;
}

.tree-node:hover {
  background: rgba(168,85,247,0.18);
  box-shadow: 0 0 0 1px rgba(168,85,247,0.3);
}

.tree-node.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
  background: rgba(168,85,247,0.15);
}

/* 子节点行 */
.tree-sub-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  position: relative;
  padding-top: 16px;
}

.tree-sub-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 16px;
  background: rgba(168,85,247,0.2);
}

.tree-sub-row::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 25%;
  right: 25%;
  height: 2px;
  background: rgba(168,85,247,0.2);
}

.tree-node.is-sub {
  padding: 4px 14px;
  font-size: 0.82rem;
  position: relative;
}

.tree-node.is-sub::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 16px;
  background: rgba(168,85,247,0.2);
}

/* -- 详情卡片 -- */

.role-details {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.role-detail-card {
  display: none;
  align-items: stretch;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.role-detail-card.active {
  display: flex;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.15);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.role-bar {
  width: 6px;
  flex-shrink: 0;
}

.is-student .role-bar { background: var(--primary); }
.is-mentor .role-bar { background: var(--primary-light); }
.is-advisor .role-bar { background: var(--accent); }
.is-cadre .role-bar { background: var(--accent-light); }
.is-head .role-bar { background: var(--accent-lighter); }
.is-leader .role-bar { background: var(--accent-pale); }

.role-body {
  padding: 22px 26px;
  flex: 1;
}

.role-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 8px;
}

.role-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.role-leader {
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(168,85,247,0.08);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-body);
}

.role-leader strong {
  color: var(--accent);
}

/* ============ 轮播 ============ */

.carousel-wrapper {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.carousel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-top: 65px;
}

.carousel-info {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carousel-info-desc {
  flex: 1;
  padding: 14px 16px;
}

.carousel-container {
  position: relative;
  max-width: 480px;
  margin: 0 0 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(45,27,78,0.08);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 853 / 518;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--text-dark);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.carousel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dots span.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.carousel-desc {
  max-width: 600px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* 校服标签 */
.uniform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.uniform-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

.uniform-tag.dress {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.uniform-tag.apron {
  background: rgba(168, 85, 247, 0.1);
  color: #a78bfa;
}

.uniform-tag.scarf {
  background: rgba(192, 57, 43, 0.2);
  color: #e8584a;
}

/* 配色色块 */
.color-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.color-swatch.swatch-red { background: #c0392b; }
.color-swatch.swatch-yellow { background: #e8b830; }
.color-swatch.swatch-blue { background: var(--accent); }

.color-swatch-label {
  font-size: 0.9rem;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: 2px;
}

.carousel-info-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.8;
  padding: 14px 16px;
  background: rgba(26, 10, 46, 0.3);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  flex: 1;
}

/* ============ 页脚 ============ */

.footer {
  background: #1a0a30;
  color: #c4b5e0;
  text-align: center;
  padding: 48px 40px 28px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c4b5e0;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-light); }

.footer-links a img {
  height: 28px;
  width: auto;
  border-radius: 4px;
}

.footer-links a img.bili-logo {
  height: 50px;
}

.footer-copy {
  font-size: 0.85rem;
  color: #a08db8;
  margin-bottom: 14px;
}

.footer-record {
  font-size: 0.8rem;
  color: #a08db8;
  margin-bottom: 6px;
}

.gongan-beian {
    display: flex;
    justify-content: center;
}

.gongan-beian img {
    margin-right: 5px;
}

.disclaimer {
  font-size: 0.8rem;
  color: #a08db8;
  font-style: italic;
  max-width: 600px;
  line-height: 1.6;
  margin: 0 auto;
}

/* ============ 移动端 ============ */

@media (max-width: 768px) {
  .nav {
    padding: 0 16px;
  }

  .nav-toggle-label {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--primary);
    padding: 8px 0;
    gap: 0;
    transform: translateY(-120%);
    transition: transform 0.3s;
    z-index: 999;
  }

  .nav-toggle:checked ~ .nav-links {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 12px 20px;
    border-radius: 0;
    font-size: 1rem;
  }

  .welcome {
    padding: 80px 16px 60px;
  }

  .welcome-title {
    font-size: 3.2rem;
    letter-spacing: 5px;
  }

  .welcome-slogan {
    font-size: 1rem;
    display: block;
    text-align: left;
  }

  .section {
    padding: 48px 16px;
  }

  .section-title {
    font-size: 1.5rem;
    padding-left: 12px;
  }

  .academy-grid {
    flex-direction: column;
  }

  .academy-card {
    max-width: 100%;
  }

  .tree-row {
    gap: 20px;
    flex-wrap: wrap;
  }

  .tree-col {
    min-width: 120px;
    padding-top: 16px;
  }

  .tree-sub-row {
    flex-wrap: wrap;
  }

  .tree-root-node {
    font-size: 1rem;
    padding: 8px 24px;
  }

  .tree-node {
    font-size: 0.82rem;
    padding: 5px 12px;
    white-space: normal;
  }

  .carousel-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .carousel-info {
    flex: none;
    width: 100%;
  }

  .carousel-container {
    max-width: 100%;
  }

  .carousel-slide {
    aspect-ratio: 853 / 518;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .footer {
    padding: 36px 16px 24px;
  }

  .footer-links {
    gap: 16px;
  }

  .footer-links a img.bili-logo {
    height: 36px;
  }
}

@media (max-width: 480px) {
  .welcome-title {
    font-size: 2.4rem;
    letter-spacing: 3px;
  }

  .welcome-stats {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* ============ 鼠标轨迹 ============ */

.mouse-trail {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.mouse-trail span {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(139,92,246,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

.mouse-trail span:nth-child(1) { width: 20px; height: 20px; opacity: 0.7; }
.mouse-trail span:nth-child(2) { width: 17px; height: 17px; opacity: 0.6; }
.mouse-trail span:nth-child(3) { width: 14px; height: 14px; opacity: 0.5; }
.mouse-trail span:nth-child(4) { width: 11px; height: 11px; opacity: 0.4; }
.mouse-trail span:nth-child(5) { width: 8px; height: 8px; opacity: 0.3; }
.mouse-trail span:nth-child(6) { width: 5px; height: 5px; opacity: 0.2; }
