:root {
  --main-bg: linear-gradient(
    to right,
    #0b1220,
    #1c2a3a 40%,
    #000 100%
  );
}

/* 全站背景 */
body {
  margin: 0;
  background: var(--main-bg);
  color: white;
  font-family: Arial, sans-serif;

  /* ⭐ 给 sidebar 留空间（桌面） */
  margin-left: 70px;

  /* ⭐ 防止横向被挤爆（很重要） */
  overflow-x: hidden;
}

/* =========================== 左边NAV BAR ============================= */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.2s;
}

.nav:hover {
  background: rgba(255,255,255,0.2);
}

/* ⭐ row 要 relative，让箭头按钮定位正确 */
.row {
  position: relative;
  margin: 30px 40px;
  z-index: 1;
}

.nav-item {
  font-size: 20px;
  margin: 20px 0;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.3s;
}

.nav-item:hover,
.nav-item.active {
  opacity: 1;
}

.nav-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ⭐ icon本体 */
.nav-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  opacity: 0.6;
  transition: 0.3s;
}

/* hover */
.nav-item:hover svg {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

/* active */
.nav-item.active svg {
  opacity: 1;
}

.left { left: 0; }
.right { right: 0; }

/* 视频弹窗 */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.video-container {
  width: 80%;
  max-width: 900px;
  position: relative;
}

iframe {
  width: 100%;
  height: 500px;
}

.close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 30px;
  cursor: pointer;
}

/* ===== 左侧导航 ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 70px;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  z-index: 1000;
}

.logo {
  font-weight: bold;
  margin-bottom: 40px;
}

/* LOGO容器 */
.logo {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
}

/* LOGO图片 */
.logo img {
  width: 40px;      /* ⭐ 控制大小 */
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: 0.3s;
}

/* hover 微动效 */
.logo img:hover {
  transform: scale(1.1);
  opacity: 1;
}


/*==================================== HERO =================================*/
.hero {
  display: flex;
  height: 420px;
  background: var(--main-bg);
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

/* ⭐ 图片作为最底层背景，平铺整个 hero */
.hero-right {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;   /* ⭐ 最底层 */
  overflow: hidden;
}

.hero-right img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.75;

  /* ⭐ 右侧往背景色渐隐，左侧保留清晰 */
  -webkit-mask-image:
    linear-gradient(to bottom,
      rgba(0,0,0,1) 25%,
      rgba(0,0,0,0) 50%
    );
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom,
      rgba(0,0,0,1) 85%,
      rgba(0,0,0,0) 100%
    );
  mask-composite: intersect;
}

/* ⭐ 遮罩层：右侧渐变回主背景 */
.hero-right::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-left {
  width: 45%;
  position: relative;
  z-index: 2;   /* ⭐ 文字在图片上层 */
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
}

.hero-left h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 3px;
}

.hero-left p {
  font-size: 18px;
  letter-spacing: 3px;
}

/* 横滑 前加 h2 样式 */
.row h2 {
  margin-bottom: 10px;
}

/* 横滑 */
.row-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.row-slider::-webkit-scrollbar {
  display: none;
}

/* 卡片 */
.card {
  position: relative;
  min-width: 180px;   /* 原本220 → 改小 */
  max-width: 180px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.card img {
  width: 100%;
  height: 110px;       /* ⭐ 关键：固定高度 */
  object-fit: cover;   /* ⭐ 防止变形 */
  border-radius: 8px;
}

.card:hover {
  transform: scale(1.15);
  z-index: 3;
}

/* 播放icon */
.card::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  opacity: 0;
}

.card:hover::after {
  opacity: 1;
}

/* ============================ FOOTER ========================== */
.footer {
  position: relative;
  background: rgba(10, 15, 25, 0.65);
  color: #e2e8f0;
  margin: 30px 50px;
  padding: 22px 72px 20px;
  border-radius: 24px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02) 40%,
    transparent 70%
  );
}

.footer-container {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .35fr) minmax(300px, .78fr);
  gap: clamp(22px, 3vw, 48px);
  align-items: center;
  min-height: 220px;
}

.footer-left { max-width: 400px; }

.footer-address {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 10px;
}

.footer-contact {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.8;
  margin-top: 10px;
  letter-spacing: 0.3px;
}

.footer-logo {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: 2px;
  color: #e2e8f0;
}

.footer-desc {
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}

/* 中 */
.footer-middle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: center;
}

.footer-middle a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.2;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-middle a:hover {
  color: #e2e8f0;
  transform: translateX(4px);
}

/* 右（粒子区域） */
.footer-right {
  width: min(100%, 300px);
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transform: translateX(26px);
  overflow: visible;
}

#particleCanvas {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateY(2px);
}

/* 底部 */
.footer-bottom {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
  font-size: 12px;
  color: #475569;
  text-align: center;
  letter-spacing: 1px;
}

/* ================= social media ================== */
.footer-social {
  display: flex;
  gap: 25px;
  margin-top: 20px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  color: #e2e8f0;
  transition: 0.3s;
  text-decoration: none;
}

.footer-social a:hover {
  transform: translateY(-4px);
  background: #fff;
  color: #111;
  box-shadow: 0 0 12px rgba(255,255,255,0.2);
}

/* icon大小 */
.footer-social i { font-size: 16px; }

/* ===== 小红书专属按钮 ===== */
.xhs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: none;      /* ❌ 去掉灰色 */
  width: auto;
  height: auto;
  padding: 0;
}

/* 控制图片大小 */
.xhs-btn img {
  width: 26px;   /* ⭐ 比原本大一点 */
  height: 26px;
  filter: brightness(0) invert(1);
  transition: 0.3s;
}

/* hover */
.xhs-btn:hover img {
  filter: brightness(1) invert(1);
  transform: scale(1.1); /* ⭐ 微微放大 */
}

/* ===== 微信弹窗背景 ===== */
.wechat-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* ===== 弹窗盒子（就是你绿框大小）===== */
.wechat-box {
  width: 260px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.wechat-box img {
  width: 100%;
  border-radius: 12px;
}

.wechat-name {
  margin-top: 12px;
  font-size: 14px;
  color: #0f172a;
}

@media (max-width: 768px) {

  /* ❌ sidebar 直接关掉 */
  .sidebar {
    display: none;
  }

  body {
    margin-left: 0;
  }

  /* ✅ HERO 改为上下结构 */
  .hero {
    flex-direction: column;
    height: auto;
  }

  /* ✅ 文字 */
  .hero-left {
    width: 100%;
    padding: 30px 20px;
  }

  .hero-left h1 {
    font-size: 26px;
    line-height: 1.3;
  }

  .hero-left p {
    font-size: 14px;
  }

  /* ✅ 图片区：手机改为独立图片块 */
  .hero-right {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
  }

  .hero-right img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero-right::after {
    display: none;
  }

  /* ✅ row */
  .row {
    margin: 20px 0;
  }

  /* ✅ footer */
  .footer {
    margin: 20px 15px;
    padding: 30px 20px 20px;
  }

  .footer-container {
    flex-direction: column;
    gap: 30px;
  }

  .footer-right {
    width: 100%;
    height: 150px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {

  .sidebar {
    display: none;
  }

  body {
    margin-left: 0;
  }

  .hero {
    height: 360px;
  }

  .hero-left {
    width: 45%;
    padding: 50px 30px;
  }

  .hero-left h1 {
    font-size: 34px;
  }

  .hero-left p {
    font-size: 16px;
  }

  .hero-right {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }

  .hero-right img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% center;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero-right::after {
    display: none;
  }

  .hero-left {
    position: relative;
    z-index: 2;
    background: linear-gradient(to right, rgba(11,18,32,0.85) 20%, transparent);
  }
}

/* ── 手机版 home 按钮 ── */
.gallery-home-btn {
  display: none; /* 桌面隐藏，有 sidebar */
}

@media (max-width: 1024px) {
  .gallery-home-btn {
    display: flex;
    position: fixed;
    top: 15px;
    right: 40px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
  }

  .gallery-home-btn:hover {
    background: rgba(255,255,255,0.2);
  }

  .gallery-home-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
  }
}