/**
 * 星辰月光工作室 - 全局样式
 * 基于old_index.html的设计风格
 */

/* 禁用移动端点击高亮效果 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 允许文本内容可选择 */
p, span, a, h1, h2, h3, h4, h5, h6,
input, textarea,
.selectable {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

:root {
  --text-color: #333;
  --bg-color: white;
  --border-color: #ddd;
  --primary-color: #f48d0e;
  --primary-hover: #d67a0a;
  --success-color: #4caf50;
  --error-color: #F65160;
  --gray-bg: #f5f5f5;
  --card-bg: white;
  --header-bg: rgba(255, 255, 255, 0.6);
  --footer-bg: #2c3e50;
}

/* 深色模式 */
body.dark-mode {
  --text-color: #ffffff;
  --bg-color: #1a1a1a;
  --border-color: #444;
  --gray-bg: #2a2a2a;
  --card-bg: #1a1a1a;
  --header-bg: rgba(26, 26, 26, 0.6);
  --footer-bg: #1a1a1a;
}

/* ==================== 隐藏原生滚动条 ==================== */
/* 适用于 Webkit 浏览器 (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* 适用于 Firefox */
* {
  scrollbar-width: none;
}

/* 适用于 IE */
body {
  -ms-overflow-style: none;
}

/* ==================== 自定义滚动条样式 ==================== */
.custom-scrollbar {
  position: fixed;
  right: 0;
  top: 0;
  width: 8px;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  display: block;
}

/* 移动端隐藏自定义滚动条 */
@media screen and (max-width: 768px) {
  .custom-scrollbar {
    display: none !important;
  }
}

.custom-scrollbar-track {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
}

.custom-scrollbar-thumb {
  position: absolute;
  width: 100%;
  background: #ffb84db3;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.custom-scrollbar-thumb.visible {
  opacity: 1;
}

.custom-scrollbar-thumb:hover {
  background: #f48d0ee6;
}

.custom-scrollbar-thumb.dragging {
  background: #f48d0ee6;
}

/* 深色模式下的滚动条 */
body.dark-mode .custom-scrollbar-thumb {
  background: #ffb84db3;
}

body.dark-mode .custom-scrollbar-thumb:hover,
body.dark-mode .custom-scrollbar-thumb.dragging {
  background: #ffc870e6;
}
/* ==================== 滚动条样式结束 ==================== */

body.dark-mode {
  background-color: var(--bg-color);
  color: var(--text-color);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* 禁止移动端缩放 - 适用于 iOS 和 Android */
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 禁止移动端缩放 - 适用于 iOS 和 Android */
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

/* 头部样式 */
header {
  padding: 20px 0;
  /* 默认开启毛玻璃效果 */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px) saturate(100%);
  -webkit-backdrop-filter: blur(8px) saturate(100%);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);

  position: sticky;
  top: 15px;
  z-index: 100;
  margin: 0 30px;
  border-radius: 16px;
  transition: all 0.3s ease;
}


/* 首页header - 初始透明 */
.header-transparent {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}


/* Header内容区 - 覆盖container的padding */
header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px !important;
  max-width: none !important;
  margin: 0 !important;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a.active {
  color: var(--primary-color);
  font-weight: 600;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

/* 汉堡菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  width: 40px;
  height: 40px;
  position: relative;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.menu-toggle span:nth-child(1) {
  top: 10px;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.menu-toggle span:nth-child(3) {
  bottom: 10px;
}

.menu-toggle.active span:nth-child(1) {
  top: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) translateY(-50%) scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  bottom: 50%;
  transform: translateX(-50%) translateY(50%) rotate(-45deg);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 15px;
  margin: 30px 0;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 50px;
  transform: translateY(-50%);
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  max-width: 600px;
}

.slide-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
}

.slide-subtitle {
  font-size: 20px;
  margin-bottom: 30px;
}

.slide-btn {
  padding: 14px 32px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.3s ease;
  display: inline-block;
}

.slide-btn:hover {
  background: var(--primary-hover);
}

/* 幻灯片导航点 */
.dots-container {
  text-align: center;
  position: absolute;
  bottom: 30px;
  width: 100%;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
  background-color: white;
}

/* Section样式 */
section {
  padding: 60px 0;
}

.section-title {
  font-size: 36px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-color);
}

.section-subtitle {
  font-size: 18px;
  text-align: center;
  color: #666;
  margin-bottom: 50px;
}

/* 按钮样式 */
.btn {
  padding: 12px 28px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.btn:hover {
  background: var(--primary-hover);
  /* 移除 transform 和 box-shadow */
}

.btn-outline {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* 卡片样式 */
.card {
  background: #f5f8fa;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

/* 网格布局 */
.grid {
  display: grid;
  gap: 30px;
}

.grid-1 {
  grid-template-columns: 1fr;
}

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

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

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

/* 页脚样式 */
footer {
  padding: 60px 0 30px;
  /* 第1层：浅色纯色背景 */
  background: #ffffff;
  color: #161616;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgb(0, 0, 0, 0.2);
}

/* 第2层：emoji背景图片容器 */
.footer-emoji-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  background-image: url('/img/sc.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.footer-emoji {
  position: absolute;
  color: #FF9F24;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

/* 第3层：毛玻璃效果 */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(4px) saturate(110%);
  -webkit-backdrop-filter: blur(4px) saturate(110%);
  z-index: 2;
  pointer-events: none;
}

/* 第4层：文字、图标 */
footer > * {
  position: relative;
  z-index: 3;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-section p,
.footer-section a {
  color: #2c3e50;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

.footer-section i {
  color: #161616;
}

.footer-section a:hover {
  color: #f48d0e;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(85, 85, 85, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #161616;
}

.social-links a i {
  color: #161616;
  transition: color 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: #ffffff;
}

.social-links a:hover i {
  color: #ffffff !important;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgb(0, 0, 0, 0.2);
  color: rgb(0, 0, 0);
}

.footer-bottom p {
  color: rgb(0, 0, 0);
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 60px 0;
  color: #666;
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  /* 显示汉堡菜单按钮 */
  .menu-toggle {
    display: flex;
  }

  /* 移动端隐藏桌面导航 */
  .nav-links {
    display: none !important;
  }

  .nav-links a.active::after {
    display: none !important;
  }

  .hero-section {
    height: 400px;
  }

  .slide-title {
    font-size: 32px;
  }

  .slide-subtitle {
    font-size: 16px;
  }

  .slide-content {
    left: 30px;
  }

  .section-title {
    font-size: 28px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }

  .nav-links {
    gap: 15px;
  }

  .hero-section {
    height: 300px;
  }

  .slide-title {
    font-size: 24px;
  }

  .slide-subtitle {
    font-size: 14px;
  }

  .slide-content {
    left: 20px;
  }

  .section-title {
    font-size: 24px;
  }

  /* 移动端保持双列布局 */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; /* 小屏幕减小间距 */
  }

  /* 特定页面的卡片保持单列 */
  /* 首页精选案例 */
  #featuredProjects,
  /* 首页客户评价 */
  .testimonials-section .grid,
  /* 案例展示页面 */
  #projectsGrid,
  /* 技术分享页面 */
  #articlesGrid,
  /* 团队介绍页面 */
  #teamGrid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* 移动端双列卡片优化 */
  .card {
    padding: 15px;
  }

  /* 通用图标尺寸适配 */
  .card i.fa,
  .card i.fas,
  .card i.far,
  .card i.fab,
  .card .icon {
    font-size: 32px !important;
  }

  /* 元信息小图标保持小尺寸 */
  .article-meta i,
  .project-meta i,
  .article-meta-item i,
  .project-meta-item i,
  .article-footer i,
  .article-author i,
  .article-views i,
  .card .article-meta i,
  .card .project-meta i,
  .card .article-footer i {
    font-size: 14px !important;
  }

  /* 服务卡片 */
  .service-card {
    padding: 20px 15px;
  }

  .service-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .service-icon i {
    font-size: 32px;
  }

  .service-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .service-card p {
    font-size: 13px;
    line-height: 1.6;
  }

  /* 统计数据项 */
  .stat-item {
    padding: 15px 10px;
  }

  .stat-number {
    font-size: 28px;
    margin-bottom: 5px;
  }

  .stat-label {
    font-size: 13px;
  }

  /* 团队成员卡片 */
  .member-card {
    padding: 25px 15px 20px;
  }

  .member-avatar {
    width: 60px;
    height: 60px;
  }

  .age-badge {
    font-size: 11px;
    padding: 2px 6px;
  }

  .member-name {
    font-size: 16px;
    margin-top: 12px;
  }

  .member-position {
    font-size: 12px;
  }

  .member-bio {
    font-size: 12px;
    line-height: 1.5;
  }

  /* 福利卡片 */
  .benefit-card {
    padding: 20px 15px;
  }

  .benefit-card i,
  .benefit-icon {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .benefit-icon i {
    font-size: 32px;
  }

  .benefit-card h3 {
    font-size: 16px;
    margin: 12px 0 8px;
  }

  .benefit-card p {
    font-size: 13px;
    line-height: 1.6;
  }

  /* 职位卡片 */
  .position-card {
    padding: 20px 15px;
  }

  .position-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .position-tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .position-card ul {
    font-size: 13px;
  }

  .position-card ul li {
    margin-bottom: 5px;
  }
}

/* 深色模式额外样式 */
body.dark-mode .card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

/* 深色模式header样式 */
body.dark-mode header {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* 深色模式下非首页header的背景 - 纯毛玻璃效果 */
body.dark-mode header:not(.header-transparent) {
  background: rgba(26, 26, 26, 0.15);
  backdrop-filter: blur(8px) saturate(100%);
  -webkit-backdrop-filter: blur(8px) saturate(100%);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
}

/* 移动端性能优化 - 降低header模糊强度 */
@media (max-width: 768px) {
  body.dark-mode header:not(.header-transparent) {
    backdrop-filter: blur(15px) saturate(120%);
    -webkit-backdrop-filter: blur(15px) saturate(120%);
  }

  /* 移动端header边距调整 */
  header {
    margin: 0 15px;
    top: 10px;
    border-radius: 12px;
  }

  /* 移动端header内边距调整 */
  header .header-content {
    padding: 18px 25px !important;
  }
}

body.dark-mode .logo {
  color: var(--text-color) !important;
}

body.dark-mode .nav-links a {
  color: var(--text-color) !important;
}

body.dark-mode footer {
  background: #161616;
  color: #ffffff;
  border-top: 1px solid rgb(255, 255, 255, 0.2);
}

body.dark-mode footer::before {
  background: rgba(0, 0, 0, 0.20);
}

body.dark-mode .footer-emoji-container {
  background-image: url('/img/sc_dark.png');
}

body.dark-mode .footer-section h3 {
  color: var(--primary-color);
}

body.dark-mode .footer-section p,
body.dark-mode .footer-section a {
  color: #e1e1e1;
}

body.dark-mode .footer-section i {
  color: #ffffff;
}

body.dark-mode .footer-section a:hover {
  color: #f48d0e;
}

body.dark-mode .social-links a {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.dark-mode .social-links a i {
  color: #ffffff;
  transition: color 0.3s ease;
}

body.dark-mode .social-links a:hover {
  color: #f48d0e;
}

body.dark-mode .social-links a:hover i {
  color: #f48d0e !important;
}

body.dark-mode .footer-bottom {
  border-top: 1px solid rgb(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
}

body.dark-mode .footer-bottom p {
  color: rgba(255, 255, 255, 1);
}

body.dark-mode .footer-bottom p span,
body.dark-mode .footer-bottom span {
  color: rgba(255, 255, 255, 1) !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

body.dark-mode .section-title {
  color: var(--text-color);
}

body.dark-mode .section-subtitle {
  color: #b0b0b0;
}

/* 更多深色模式样式 */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: var(--text-color);
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode span {
  color: #b0b0b0;
}

/* header 中的 p 标签保持白色 */
body.dark-mode header p,
body.dark-mode header li,
body.dark-mode header span {
  color: var(--text-color);
}

body.dark-mode .page-header {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%) !important;
  color: var(--text-color) !important;
}

body.dark-mode .page-header h1,
body.dark-mode .page-header p {
  color: var(--text-color) !important;
}

body.dark-mode section {
  background: var(--bg-color) !important;
}

/* 深色模式 - 浅色背景的section */
body.dark-mode .stats-section,
body.dark-mode .cta-section {
  background: #333 !important;
}

/* 深色模式 - 深色背景的section */
body.dark-mode .about-section {
  background: #1e1e1e !important;
}

/* 深色模式 - 普通背景的section */
body.dark-mode .services-section,
body.dark-mode .projects-section,
body.dark-mode .projects-preview,
body.dark-mode .testimonials-section,
body.dark-mode .tech-stack-section {
  background: var(--gray-bg) !important;
}

body.dark-mode .hero-section {
  background: var(--bg-color);
}

body.dark-mode .slide {
  background: var(--card-bg);
}

body.dark-mode .member-card,
body.dark-mode .project-card,
body.dark-mode .article-card,
body.dark-mode .service-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .member-card:hover,
body.dark-mode .project-card:hover,
body.dark-mode .article-card:hover,
body.dark-mode .service-card:hover {
  background: #2d2d2d;
}

body.dark-mode .timeline-content {
  background: transparent;
  border-color: var(--border-color);
}

body.dark-mode .timeline-dot {
  background: var(--primary-color);
  border-color: var(--border-color);
}

body.dark-mode .benefit-card,
body.dark-mode .position-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .stat-item {
  background: transparent;
  border-color: var(--border-color);
}

body.dark-mode .skill-tag,
body.dark-mode .position-tag,
body.dark-mode .tech-tag,
body.dark-mode .tag {
  background: #333 !important;
  border-color: #555 !important;
  color: #ccc !important;
}

/* 浅色模式筛选按钮 */
.filter-btn:not(.active):hover {
  background: rgba(244, 141, 14, 0.2) !important;
  color: #f48d0e !important;
  border-color: #f48d0e !important;
}

.filter-btn.active {
  color: #ffffff !important;
}

.filter-btn.active:hover {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .filter-btn {
  background: #404040 !important;
  border-color: #555 !important;
  color: #f48d0e !important;
}

body.dark-mode .filter-btn:not(.active):hover {
  background: rgba(244, 141, 14, 0.15) !important;
  border-color: #f48d0e !important;
  color: #f48d0e !important;
}

body.dark-mode .filter-btn.active {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .filter-btn.active:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .back-btn {
  background: var(--card-bg);
  color: var(--text-color);
}

body.dark-mode .back-btn:hover {
  background: #333;
}

body.dark-mode .contact-form,
body.dark-mode .sidebar-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .loading {
  color: var(--text-color);
}

body.dark-mode .error {
  background: #3d1f1f;
  color: #ff6b6b;
}

body.dark-mode .nav-overlay {
  background: transparent;
}

/* 深色模式覆盖内联样式 */
body.dark-mode section[style*="background: white"],
body.dark-mode section[style*="background: #f9fafb"],
body.dark-mode section[style*="background:#f9fafb"],
body.dark-mode section[style*="background: rgb"],
body.dark-mode div[style*="background: white"],
body.dark-mode div[style*="background: #f9fafb"] {
  background: var(--gray-bg) !important;
}

body.dark-mode div[style*="color: #666"],
body.dark-mode div[style*="color:#666"],
body.dark-mode p[style*="color: #666"],
body.dark-mode p[style*="color:#666"] {
  color: #aaa !important;
}

body.dark-mode div[style*="color: #999"],
body.dark-mode div[style*="color:#999"] {
  color: #888 !important;
}

body.dark-mode div[style*="color: #333"],
body.dark-mode div[style*="color:#333"] {
  color: #ccc !important;
}

/* 保持橙色图标在深色模式下可见 */
body.dark-mode div[style*="color: #f48d0e"],
body.dark-mode div[style*="color:#f48d0e"],
body.dark-mode .service-icon,
body.dark-mode .benefit-icon {
  color: var(--primary-color) !important;
}

/* 深色模式下的统计区块 */
body.dark-mode .stat-number {
  color: var(--primary-color) !important;
}

body.dark-mode .stat-label {
  color: var(--text-color) !important;
}

/* 按钮深色模式 */
body.dark-mode .btn,
body.dark-mode button[class*="btn"],
body.dark-mode input[type="submit"],
body.dark-mode button[type="submit"] {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .btn:hover,
body.dark-mode button[class*="btn"]:hover {
  background: var(--primary-hover) !important;
}

/* 特定按钮样式 */
body.dark-mode .submit-btn,
body.dark-mode .apply-btn {
  background: var(--primary-color) !important;
  color: white !important;
}

/* 特定区块深色模式 */
/* 深色模式 - 浅色背景的section (加入我们页面) */
body.dark-mode .positions-section {
  background: #333 !important;
}

/* 深色模式 - 深色背景的section */
body.dark-mode .timeline-section,
body.dark-mode .application-section {
  background: #1e1e1e !important;
}

/* 深色模式 - 普通背景的section */
body.dark-mode .why-join-section,
body.dark-mode .values-section {
  background: var(--gray-bg) !important;
}

body.dark-mode .value-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .value-card h3,
body.dark-mode .why-join-section h2 {
  color: var(--text-color) !important;
}

body.dark-mode .value-card p,
body.dark-mode .why-join-section p {
  color: #b0b0b0 !important;
}

/* 表单元素深色模式 */
body.dark-mode .contact-form h2,
body.dark-mode .contact-form label {
  color: var(--text-color) !important;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
  border-color: var(--primary-color);
  background: #2d2d2d;
}

/* 网格元素深色模式 */
body.dark-mode .grid > div {
  color: var(--text-color);
}

body.dark-mode .grid > div h3,
body.dark-mode .grid > div h4 {
  color: var(--text-color) !important;
}

body.dark-mode .grid > div p {
  color: #b0b0b0 !important;
}

/* 所有带有内联样式的元素强制覆盖 */
body.dark-mode [style*="padding"] {
  background: inherit !important;
}

body.dark-mode section > .container > h2,
body.dark-mode .container > h2 {
  color: var(--text-color) !important;
}

body.dark-mode section > .container > p,
body.dark-mode .container > p {
  color: #b0b0b0 !important;
}

/* page-header 中的 p 标签必须是白色 */
body.dark-mode .page-header .container > p,
body.dark-mode .page-header p {
  color: var(--text-color) !important;
}

/* 特定文本颜色覆盖 */
body.dark-mode [style*="color: rgb"],
body.dark-mode [style*="color:rgb"] {
  color: var(--text-color) !important;
}

/* 卡片内的文本元素 */
body.dark-mode .card * {
  color: inherit;
}

body.dark-mode .card h3,
body.dark-mode .card h4 {
  color: var(--text-color) !important;
}

body.dark-mode .card p,
body.dark-mode .card li {
  color: #b0b0b0 !important;
}

/* 引用和特殊元素 */
body.dark-mode .fa-quote-left {
  color: var(--primary-color) !important;
}

/* 移动端侧边菜单深色模式 - 强制统一所有页面 */
@media (max-width: 768px) {
  /* 移动端导航样式已移至 m_nav.html 组件 */
}

/* 深色模式切换开关文本标签 - 桌面版默认隐藏 */
.theme-toggle-label {
  display: none;
}

/* 隐藏 header 中的深色模式切换 - 使用浮动按钮代替 */
.theme-toggle-wrapper {
  display: none !important;
}

/* 深色模式切换开关 - Switch样式 */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  flex-shrink: 0;
  padding: 0;
  border: none;
  user-select: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}


.theme-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.theme-toggle-icon {
  font-size: 12px;
  color: #ffa500;
  transition: all 0.3s ease;
  pointer-events: none;
}

/* 深色模式激活状态 */
body.dark-mode .theme-toggle {
  background: #4a5568;
}


body.dark-mode .theme-toggle-slider {
  transform: translateX(30px);
  background: #2d3748;
}

body.dark-mode .theme-toggle-icon {
  color: #ffd700;
}

@media (max-width: 768px) {
  .theme-toggle {
    width: 54px;
    height: 28px;
  }

  .theme-toggle-slider {
    width: 22px;
    height: 22px;
  }

  .theme-toggle-icon {
    font-size: 11px;
  }

  body.dark-mode .theme-toggle-slider {
    transform: translateX(26px);
  }
}

/* 返回顶部按钮 */
/* 浮动深色模式切换按钮 */
.float-theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #1a1a1a;
  color: var(--primary-color);
  border: 0.5px solid #333;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.float-theme-toggle.show {
  opacity: 1;
  visibility: visible;
}

.float-theme-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

.float-theme-toggle i,
.float-theme-toggle svg {
  animation: themeToggleIn 0.4s ease-out;
}

@keyframes themeToggleIn {
  0% {
    transform: rotate(-90deg) scale(0) translateZ(0);
    opacity: 0;
  }
  50% {
    transform: rotate(0deg) scale(1.2) translateZ(0);
  }
  100% {
    transform: rotate(0deg) scale(1) translateZ(0);
    opacity: 1;
  }
}

.float-theme-toggle.shift-up {
  transform: translateY(-70px);
}

.float-theme-toggle:hover {
  background: #222;
  border-color: #444;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.float-theme-toggle.shift-up:hover {
  transform: translateY(-73px);
}

.float-theme-toggle:active {
  transform: translateY(-1px);
}

.float-theme-toggle.shift-up:active {
  transform: translateY(-71px);
}

body.dark-mode .float-theme-toggle {
  background: white;
  color: var(--primary-color);
  border: 0.5px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .float-theme-toggle:hover {
  background: #f5f5f5;
  border-color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮 tooltip 样式 - 毛玻璃效果（和header完全统一） */
.button-tooltip {
  position: fixed;
  transform: translate(-100%, -50%) scale(0.9) translateZ(0);
  /* 浅色模式 - 和header完全统一的毛玻璃参数 */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px) saturate(100%);
  -webkit-backdrop-filter: blur(8px) saturate(100%);
  color: rgba(0, 0, 0, 0.85);
  padding: 10px 14px;
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10001;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.button-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-100%, -50%) scale(1) translateZ(0);
}

/* 深色模式 - 和header完全统一的毛玻璃参数 */
body.dark-mode .button-tooltip {
  background: rgba(26, 26, 26, 0.15);
  backdrop-filter: blur(8px) saturate(100%);
  -webkit-backdrop-filter: blur(8px) saturate(100%);
  color: rgba(255, 255, 255, 0.95);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
}

/* 移动端性能优化 - 和header保持一致 */
@media (max-width: 768px) {
  .button-tooltip {
    backdrop-filter: blur(8px) saturate(100%);
    -webkit-backdrop-filter: blur(8px) saturate(100%);
    pointer-events: none; /* 移动端 tooltip 不可交互 */
  }

  body.dark-mode .button-tooltip {
    backdrop-filter: blur(8px) saturate(100%);
    -webkit-backdrop-filter: blur(8px) saturate(100%);
  }

}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: white;
  color: var(--primary-color);
  border: 0.5px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #f5f5f5;
  border-color: #ccc;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top:active {
  transform: translateY(-1px);
}

.back-to-top:active i,
.back-to-top:active svg,
.back-to-top.clicking i,
.back-to-top.clicking svg {
  animation: jumpUp 1s ease-in-out;
}

@keyframes jumpUp {
  0% {
    transform: translateY(0) translateZ(0);
    opacity: 1;
  }
  40% {
    transform: translateY(-35px) translateZ(0);
    opacity: 0;
  }
  41% {
    transform: translateY(35px) translateZ(0);
    opacity: 0;
  }
  70% {
    transform: translateY(35px) translateZ(0);
    opacity: 0;
  }
  100% {
    transform: translateY(0) translateZ(0);
    opacity: 1;
  }
}

body.dark-mode .back-to-top {
  background: #1a1a1a;
  color: var(--primary-color);
  border-color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .back-to-top:hover {
  background: #222;
  border-color: #444;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .float-theme-toggle {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .float-theme-toggle.shift-up {
    transform: translateY(-65px);
  }

  .float-theme-toggle.shift-up:hover {
    transform: translateY(-68px);
  }

  .float-theme-toggle.shift-up:active {
    transform: translateY(-66px);
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  /* 移动端气泡tooltip字体稍小 */
  .float-theme-toggle::before,
  .back-to-top::before {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* ============================================
   模态框样式（全局）
   ============================================ */

/* 防止模态框打开时页面抖动 */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0);
}

/* 同时调整固定定位元素 */
body.modal-open header {
  padding-right: var(--scrollbar-width, 0) !important;
  box-sizing: border-box;
}

body.modal-open .back-to-top,
body.modal-open .back-to-top.show {
  transform: translateX(calc(-1 * var(--scrollbar-width, 0)));
  transition: none;
}

body.modal-open .back-to-top:hover {
  transform: translateX(calc(-1 * var(--scrollbar-width, 0))) translateY(-3px);
}

body.modal-open .back-to-top:active {
  transform: translateX(calc(-1 * var(--scrollbar-width, 0))) translateY(-1px);
}

body.modal-open .float-theme-toggle,
body.modal-open .float-theme-toggle.show {
  transform: translateX(calc(-1 * var(--scrollbar-width, 0)));
  transition: none;
}

body.modal-open .float-theme-toggle:hover {
  transform: translateX(calc(-1 * var(--scrollbar-width, 0))) translateY(-3px);
}

/* 确保模态框在最上层 */
body.modal-open .modal {
  z-index: 10000;
}

/* 模态框基础样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;

}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px) saturate(100%);
  -webkit-backdrop-filter: blur(10px) saturate(100%);
  animation: fadeIn 0.3s ease-out;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout style paint;
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(100%);
  -webkit-backdrop-filter: blur(20px) saturate(100%);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10001;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout style paint;
}

/* 移动端性能优化 - 降低模糊强度 */
@media (max-width: 768px) {
  .modal-overlay {
    backdrop-filter: blur(5px) saturate(150%);
    -webkit-backdrop-filter: blur(5px) saturate(150%);
  }

  .modal-content {
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    animation: slideInScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.modal.closing .modal-overlay {
  animation: fadeOut 0.3s ease-out forwards;
}

.modal.closing .modal-content {
  animation: slideOutScale 0.3s ease-out forwards;
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 24px;
  overflow: visible;
}

.modal-description {
  margin: 0 0 20px;
  color: #666;
  font-size: 15px;
  line-height: 1.6;
}

.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  justify-content: flex-end;
}

.modal-confirm-btn {
  padding: 12px 32px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.modal-confirm-btn:hover {
  background: var(--primary-hover);
}

/* 模态框动画 - 硬件加速优化 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateZ(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateZ(0);
  }
  to {
    opacity: 0;
    transform: translateZ(0);
  }
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(20px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0) translateZ(0);
  }
}

@keyframes slideOutScale {
  from {
    opacity: 1;
    transform: scale(1) translateY(0) translateZ(0);
  }
  to {
    opacity: 0;
    transform: scale(0.7) translateY(20px) translateZ(0);
  }
}

/* 深色模式 */
body.dark-mode .modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-content {
  background: rgba(42, 42, 42, 0.95);
  backdrop-filter: blur(20px) saturate(100%);
  -webkit-backdrop-filter: blur(20px) saturate(100%);
}

/* 深色模式移动端性能优化 */
@media (max-width: 768px) {
  body.dark-mode .modal-content {
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
  }
}

body.dark-mode .modal-header {
  border-bottom-color: #444;
}

body.dark-mode .modal-header h3 {
  color: #ffffff;
}

body.dark-mode .modal-close {
  color: #ffffff;
}

body.dark-mode .modal-close:hover {
  background: #3a3a3a;
  color: #e0e0e0;
}

body.dark-mode .modal-description {
  color: #b0b0b0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-content {
    width: 85%;
  }

  .modal-header {
    padding: 20px 25px 14px;
  }

  .modal-header h3 {
    font-size: 18px;
  }

  .modal-body {
    padding: 20px 25px;
  }
}

