/* ====================
   1. 全局变量定义 (白色主题)
   ==================== */
:root {
  /* 颜色系统 */
  --bg-color: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);

  /* === 修改这里 === */
  --primary-color: #8670c3; /* 新的主题色 */
  --primary-hover: #725bb0; /* 新的悬停色 (加深版) */
  /* ================ */

  --text-main: #333333;
  --text-sub: #777777;
  --border-color: #e5e5e5;

  /* 字体系统 */
  --font-stack: "Outfit", "Alibaba PuHuiTi", sans-serif;
}

/* ====================
   2. 字体引入
   ==================== */
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("fonts/Alibaba-PuHuiTi-Regular.woff2") format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("fonts/Alibaba-PuHuiTi-Bold.woff2") format("woff2");
  font-weight: 700;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("fonts/Alibaba-PuHuiTi-Heavy.woff2") format("woff2");
  font-weight: 900;
}
/* ====================
   全局文字选中样式 (Highlight Color)
   ==================== */
::selection {
  background-color: var(--primary-color); /* 背景变主题紫 */
  color: #ffffff; /* 文字变白 */
}

/* 针对 Firefox 浏览器的兼容写法 */
::-moz-selection {
  background-color: var(--primary-color);
  color: #ffffff;
}
/* ====================
   3. 基础重置
   ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-stack);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ====================
   4. 导航栏 (Navbar)
   ==================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 56px;
  width: auto;
  /* 强制将 Logo 渲染为主题紫色 */
  filter: brightness(0) saturate(100%) invert(51%) sepia(8%) saturate(2260%)
    hue-rotate(221deg) brightness(91%) contrast(84%);
}

.nav-menu {
  display: flex;
  background: #f5f5f5;
  padding: 5px;
  border-radius: 50px;
}

.nav-link {
  padding: 8px 24px;
  border-radius: 40px;
  font-size: 0.95rem;
  color: var(--text-sub);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ====================
   修改位置：style.css 约 106 行开始
   ==================== */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 50px;

  /* 修改这里：默认文字改为灰色 */
  color: #999999;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.lang-switch:hover {
  border-color: var(--primary-color);
  color: var(--primary-color); /* 悬停时变回紫色 */
}

.icon-sm {
  width: 16px;
  height: 16px;
  transition: 0.3s; /* 添加过渡让变色更柔和 */
}

/* 新增：专门针对 ENG 按钮里的图标，强制变灰 */
.lang-switch .icon-sm {
  /* 使用滤镜变灰并降低不透明度 */
  filter: grayscale(100%) opacity(0.5);
}

/* 保持不变：悬停时图标变紫 */
.lang-switch:hover .icon-sm {
  filter: brightness(0) saturate(100%) invert(51%) sepia(8%) saturate(2260%)
    hue-rotate(221deg) brightness(91%) contrast(84%);
  opacity: 1;
}

.mobile-toggle {
  display: none;
}
.mobile-toggle img {
  width: 28px;
}

/* ====================
   5. Hero Section (首屏)
   ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  position: relative;
  padding-top: 80px;
}

.hero-content {
  flex: 1;
  z-index: 2;
  padding-right: 20px;
}

.hero-subtitle {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-main);
}

.hero-desc {
  color: var(--text-sub);
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 40px;
}

/* 按钮组 */
.hero-btns {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 14px 36px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.3s, border-color 0.3s;
}

/* 主按钮 (Let's GOOO!) - 强制白色文字 */
.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff !important; /* 这里加上 !important 确保永远是白色 */
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff !important; /* Hover时也强制白色 */
}

/* 次按钮 (See Our Projects) */
.btn-outline {
  border: 3px solid var(--border-color);
  color: var(--text-main);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--text-main); /* 颜色不变 */
}

.icon-arrow {
  width: 18px;
  transform: rotate(90deg);
}

.btn-outline:hover .icon-arrow {
  transform: rotate(90deg); /* 箭头不动 */
}

/* 图片区域 */
.hero-image-container {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  position: relative;
  padding-left: 120px;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 550px;
  height: auto;
  transition: 0.2;
}

.hero-img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.1));
  /* 修改这里：改为大圆角 */
  border-radius: 50px;
}

.bg-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  padding-top: 80%;
  background: #f3eaf8;
  border-radius: 50%;
  z-index: 1;
}

/* ====================
   6. Footer (底部)
   ==================== */
.footer {
  padding: 40px 5%;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  background-color: #fafafa;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.footer-socials {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-socials img {
  width: 24px;
  height: 24px;
  transition: 0.3s;
  /* 强制：主题紫色 (不再是灰色) */
  filter: brightness(0) saturate(100%) invert(51%) sepia(8%) saturate(2260%)
    hue-rotate(221deg) brightness(91%) contrast(84%);
  opacity: 1;
}

.footer-socials a:hover img {
  /* 悬停：只放大，颜色保持紫色 */
  filter: brightness(0) saturate(100%) invert(51%) sepia(8%) saturate(2260%)
    hue-rotate(221deg) brightness(91%) contrast(84%);
  transform: scale(1.1);
}

.footer-links {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: var(--text-sub);
}

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

.footer-copyright {
  font-size: 0.85rem;
  color: #999;
}

/* ====================
   7. 响应式适配 (Mobile)
   ==================== */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 100px;
    gap: 40px;
  }

  .hero-image-container {
    padding-left: 0;
    justify-content: center;
  }

  .hero-content {
    padding-right: 0;
  }

  .hero-title {
    font-size: 3rem;
  }

  .image-wrapper {
    width: 80%;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    justify-content: center;
  }
}

.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: #ffffff;
  display: none;
  flex-direction: column;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  z-index: 999;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  padding: 15px;
  border-bottom: 1px solid #eee;
  text-align: center;
  color: var(--text-main);
}
/* 缩小中红书图标 */
.footer-socials img[src*="xiaohongshu"] {
  width: 21px;
  height: 21px;
  margin-top: 2px; /* 因为缩小了，可能需要稍微往下挪一点点保持居中 */
}

/* 缩小米画师图标 */
.footer-socials img[src*="mihuashi"] {
  width: 21px;
  height: 21px;
  margin-top: 1.5px;
}

/* ====================
   8. 通用版块样式 (Sections)
   ==================== */
.section {
  padding: 100px 8%;
  position: relative;
}

.section-header {
  margin-bottom: 60px;
  text-align: center; /* 标题居中 */
}

.section-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-color);
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.section-desc {
  color: var(--text-sub);
  font-size: 1.1rem;
}

/* ====================
   9. 卡片系统 (Card System)
   ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  border-radius: 30px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 400px; /* 保证卡片有高度 */
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

/* --- 深色卡片 (深紫底 + 白字) --- */
.card-dark {
  background-color: var(--primary-color);
  color: #ffffff;
}
.card-dark .card-subtitle {
  color: rgba(255, 255, 255, 0.7);
}
.card-dark .card-text {
  color: rgba(255, 255, 255, 0.9);
}

/* --- 浅色卡片 (淡紫底 + 深紫字) --- */
.card-light {
  background-color: #eeeaf8;
  color: var(--primary-color);
}
.card-light .card-subtitle {
  color: rgba(157, 118, 193, 0.7);
}
.card-light .card-text {
  color: var(--text-main);
}

/* --- 卡片内容排版 --- */
.card-title {
  font-size: 3.5rem; /* 非常大的标题 */
  font-weight: 900;
  line-height: 0.9;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.card-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 20px;
}

.card-list {
  list-style: none;
  font-size: 1.1rem;
  line-height: 1.8;
}

.card-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* --- 卡片内的按钮 --- */
.card-btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 700;
  text-align: center;
  transition: 0.3s;
}

/* 深色卡片里的白色按钮 */
.btn-white {
  background-color: #ffffff;
  color: var(--primary-color) !important; /* 强制紫色 */
}
.btn-white:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
  color: var(--primary-color) !important; /* 悬停时依然强制紫色 */
}

/* 浅色卡片里的紫色按钮 */
.btn-purple {
  background-color: var(--primary-color);
  color: #ffffff !important; /* 强制白色 */
}
.btn-purple:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
  color: #ffffff !important; /* 悬停时依然强制白色 */
}

/* 背景装饰图标 */
.card-icon-bg {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 150px;
  opacity: 0.1;
  transform: rotate(-15deg);
  filter: invert(1); /* 确保深色背景上能看到(如果是黑色图标) */
}

/* ====================
   10. 画廊特定样式 (Gallery)
   ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.gallery-card {
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* 移除 min-height 让它适应内容 */
  min-height: auto;
  padding: 0; /* 内部布局自己控制 */
}

.gallery-img-box {
  flex: 1;
  height: 300px;
  overflow: hidden;
}

.gallery-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.gallery-card:hover .gallery-img-box img {
  /* 原来是 transform: scale(1.1); 现在改为 none */
  transform: none;
}

.gallery-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gallery-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1;
}

.arrow-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.icon-arrow-dark {
  width: 16px;
  /* 默认黑色图标 */
}

.text-white {
  color: #fff;
}
.icon-arrow-white {
  width: 16px;
  filter: invert(1) brightness(100%); /* 强制变白 */
  transform: rotate(90deg);
}
.gallery-card:hover .icon-arrow-white,
.gallery-card:hover .icon-arrow-dark {
  transform: rotate(90deg) translateX(5px); /* 悬停移动 */
}

/* ====================
   11. 树洞特定样式 (Hollow)
   ==================== */
.hollow-container {
  border-radius: 40px; /* 更大的圆角 */
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.hollow-content {
  flex: 1;
}

.hollow-title {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
}

.hollow-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin-bottom: 40px;
}

.hollow-btns {
  display: flex;
  gap: 20px;
}

.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important; /* 强制白色 */
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 700;
  transition: 0.3s;
}
.btn-outline-white:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important; /* 悬停时依然强制白色 */
}

.hollow-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hollow-visual img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  transform: rotate(3deg); /* 俏皮的倾斜 */
}

/* ====================
   12. 响应式补充
   ==================== */
@media (max-width: 900px) {
  .section-title {
    font-size: 2.5rem;
  }

  /* 让画廊在移动端变单列 */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* 树洞变竖排 */
  .hollow-container {
    flex-direction: column-reverse;
    text-align: center;
    padding: 40px;
  }

  .hollow-visual img {
    max-width: 200px;
    transform: rotate(0);
    margin-bottom: 20px;
  }

  .hollow-btns {
    justify-content: center;
    flex-direction: column;
  }

  .hollow-text {
    margin: 0 auto 30px auto;
  }
}
/* ====================
   终极强制字体覆盖 (Ultimate Font Override)
   放在文件最后，确保覆盖所有第三方框架
   ==================== */

/* 1. 强制 Body 使用指定字体 */
body {
  font-family: var(--font-stack) !important;
}

/* 2. 强制所有标题和常见标签也继承该字体 
   (防止某些框架单独给 h1-h6 设置字体) */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li,
div,
button,
input,
textarea,
select,
.section-title,
.card-title {
  font-family: var(--font-stack) !important;
}
