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

/* 根变量定义，用于视窗高度兼容性 */
:root {
  --vh: 1vh; /* 默认值，将由JavaScript动态更新 */
}

body {
  font-family: 'Arial', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #000000, #000212, #000634);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100); /* 使用CSS变量作为备用方案 */
  min-height: 100dvh; /* 动态视窗高度，支持现代浏览器 */
  overflow: hidden;
}

@keyframes gradientBG {
  0% {
      background-position: 0% 50%;
  }
  50% {
      background-position: 100% 50%;
  }
  100% {
      background-position: 0% 50%;
  }
}

/* 侧边栏样式 */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100); /* 使用CSS变量作为备用方案 */
  height: 100dvh; /* 动态视窗高度，支持现代浏览器 */
  width: 240px;
  background: rgba(0, 0, 0, 0.9);
  border-right: 1px solid rgba(0, 219, 255, 0.3);
  z-index: 100;
  transition: width 0.3s ease, transform 0.3s ease;
  transform: translateX(0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed {
  width: 60px;
  transform: translateX(0);
}

/* 隐藏 collapsed 状态下的文字 */
.sidebar.collapsed .sidebar-menu li span,
.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .new-chat-button span,
.sidebar.collapsed .about-button span,
.sidebar.collapsed .login-button span,
.sidebar.collapsed .manual-button span {
  display: none;
}

/* 侧边栏收起时，新对话按钮居中 */
.sidebar.collapsed .new-chat-button {
  padding-left: 50%;
  transform: translateX(-50%);
  margin: 10px auto; /* 统一间距 */
}

/* 侧边栏收起时，登录按钮调整 */
.sidebar.collapsed .login-button {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 10px auto; /* 统一间距 */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 侧边栏收起时，关于按钮调整 */
.sidebar.collapsed .about-button {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 10px auto; /* 统一间距 */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 侧边栏收起时，手册按钮调整 */
.sidebar.collapsed .manual-button {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 10px auto; /* 统一间距 */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  color: #00dbff;
  font-size: 20px;
  margin-left: 10px;
}

/* 新对话按钮 */
.new-chat-button {
  padding: 8px 15px;
  background: linear-gradient(to right, #00dbff, #ff00ff);
  border: none;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 10px;
  margin-left: 15px;
  margin-top: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-right: auto;
}

.new-chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle {
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s, transform 0.3s;
  margin-right: 5px;
}

/* 展开和收起的三角图像 */
.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(0deg);
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: transform 0.3s ease;
  transform: rotate(180deg);
}

.sidebar-toggle:hover {
  background-color: rgba(0, 219, 255, 0.2);
}

.sidebar-menu {
  list-style: none;
  padding: 10px;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-menu li {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  margin-bottom: 5px;
}

.sidebar-menu li:hover {
  background: rgba(0, 219, 255, 0.2);
}

.sidebar-menu li.active {
  background: linear-gradient(to right, rgba(0, 219, 255, 0.3), rgba(255, 0, 255, 0.3));
  border-right: 4px solid #00dbff;
}

.sidebar-menu li a {
  color: #fff;
  text-decoration: none;
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 10px;
}

/* 对话选项卡菜单样式 */
.chat-tab-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(0, 219, 255, 0.5);
  border-radius: 5px;
  padding: 5px;
  z-index: 101;
  display: none;
}

.chat-tab-menu.active {
  display: block;
}

.chat-tab-menu-button {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 侧边栏收起时，使用聊天图标替代三个点 */
.sidebar.collapsed .chat-tab-menu-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="24px" height="24px"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/></svg>') no-repeat center center;
  background-size: contain;
  pointer-events: none;
}

.sidebar:not(.collapsed) .chat-tab-menu-button svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.chat-tab-menu-button:focus + .chat-tab-menu,
.chat-tab-menu:hover {
  display: block;
}

.chat-tab-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chat-tab-menu li {
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-tab-menu li:last-child {
  border-bottom: none;
}

.chat-tab-menu li:hover {
  background: rgba(0, 219, 255, 0.2);
}

/* 主内容区域样式 */
.main-content {
  margin-left: 250px;
  transition: margin-left 0.3s ease, width 0.3s ease;
  width: calc(100% - 250px);
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100); /* 使用CSS变量作为备用方案 */
  height: 100dvh; /* 动态视窗高度，支持现代浏览器 */
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed + .main-content {
  margin-left: 60px;
  width: calc(100% - 60px);
}

/* 小屏幕下侧边栏样式 */
.modal-rename,
.modal-delete {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  max-width: 90%;
  font-size: 16px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .modal-about {
      border: 2px solid rgba(0, 219, 255, 0.5);
      border-radius: 15px;
      padding: 10px;
      text-align: center;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
      width: 80%;
      max-width: none;
  }

  .modal-about h2 {
      font-size: 22px;
      margin-bottom: 10px;
      text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
  }

  .modal-about p {
      font-size: 14px; /* 改为 14px */
      margin-bottom: 15px;
      line-height: 1.4;
  }

  .modal-about .close-button {
    font-size: 13px; /* 字体从 14px 改为 13px，略小但不夸张 */
    background: transparent;
    border: 2px solid rgba(0, 219, 255, 0.7);
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
    margin-top: 15px;
    padding: 9px 18px; /* 内边距从 10px 20px 改为 9px 18px，略小 */
    /* 不设置固定 width 和 height，让尺寸自然适应 */
    line-height: 1; /* 保持文字居中 */
    box-sizing: border-box;
  }

  .modal-about .close-button:hover {
      background-color: rgba(0, 219, 255, 0.2);
      border-color: #00dbff;
      color: #00dbff;
  }

  .sidebar {
      width: 70%;
      transform: translateX(-100%);
      z-index: 103;
  }

  .sidebar-menu li span {
      display: block;
  }

  .sidebar .sidebar-header h2 {
      display: block;
  }

  .sidebar .new-chat-button span {
      display: flex;
  }

  .sidebar .new-chat-button {
      padding-left: 15px;
      transform: translateX(0);
  }

  .main-content {
      margin-left: 0;
      width: 100%;
  }

  .sidebar.collapsed + .main-content {
      margin-left: 0;
      width: 100%;
  }

  .mobile-menu-toggle {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 105;
      background: rgba(0, 0, 0, 0.7);
      color: #fff;
      padding: 10px 15px;
      cursor: pointer;
      display: flex;
      align-items: center;
      height: 41px;
      box-sizing: border-box;
  }

  .mobile-menu-toggle svg {
      width: 24px;
      height: 24px;
      fill: #fff;
  }

  .mobile-menu-toggle.hidden {
      display: none;
  }

  .sidebar-overlay {
      position: fixed;
      display: none;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      height: calc(var(--vh, 1vh) * 100); /* 使用CSS变量作为备用方案 */
      height: 100dvh; /* 动态视窗高度，支持现代浏览器 */
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 102;
  }

  #chat-title {
      margin-top: 35px !important;
      margin-bottom: 0px !important;
      padding-bottom: 0px !important;
  }

  .main-content #chat-iframe-container .chat-iframe-wrapper {
      margin-top: 0px;
  }

  /* 调整登录和关于按钮文字大小 */
  .login-button {
    font-size: 14px; /* 改为 14px */
  }

  .about-button {
    font-size: 14px; /* 改为 14px */
  }

  /* 手册按钮文字大小 */
  .manual-button {
    font-size: 14px; /* 与其他按钮一致 */
  }

  /* 如果需要对话选项卡也改为 14px */
  .sidebar-menu li {
    font-size: 14px; /* 可选：与按钮和模态框一致 */
  }
}

/* 页面标题样式 */
.page-title {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(to right, #00dbff, #ff00ff);
  -webkit-background-clip: text;
  color: transparent;
  padding: 10px 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
}

/* iframe 容器样式 */
#chat-iframe-container {
  flex: 1;
  width: 100%;
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 对话标题样式 */
#chat-title {
  font-size: 1em;
  font-weight: bold;
  text-align: left;
  padding: 10px 15px;
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 40;
}

/* iframe 容器 */
.chat-iframe-wrapper {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
  display: none;
  position: relative;
}

.chat-iframe-wrapper.active {
  display: block;
}

/* 加载指示器 */
.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 100;
}

.loading-dot {
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  animation: typing 1.5s infinite;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0% {
      transform: scale(1);
      opacity: 0.6;
  }
  50% {
      transform: scale(1.2);
      opacity: 1;
  }
  100% {
      transform: scale(1);
      opacity: 0.6;
  }
}

/* 重命名模态框样式 */
.modal-rename {
  display: none;
  position: absolute;
  background: linear-gradient(135deg, #000000, #000212, #000634);
  border: 2px solid rgba(0, 219, 255, 0.5);
  border-radius: 15px;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  text-align: center;
  box-sizing: border-box;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.modal-rename.active {
  display: block;
}

.modal-rename .modal-content {
  padding: 20px;
  width: 100%;
}

.modal-rename .buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 15px 0 0;
}

.modal-rename p {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.modal-rename input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid rgba(0, 219, 255, 0.5);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 16px;
}

.modal-rename input[type="text"]:focus {
  outline: none;
  border-color: #00dbff;
  box-shadow: 0 0 5px rgba(0, 219, 255, 0.5);
}

.modal-rename button {
  padding: 8px 18px;
  font-size: 15px;
  background: linear-gradient(to right, #00dbff, #ff00ff);
  border: none;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.modal-rename button:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 删除确认模态框样式 */
.modal-delete {
  display: none;
  position: absolute;
  background: linear-gradient(135deg, #000000, #000212, #000634);
  border: 2px solid rgba(0, 219, 255, 0.5);
  border-radius: 15px;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.modal-delete.active {
  display: block;
}

.modal-delete .modal-content {
  padding: 5px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-delete .buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 5px;
}

.modal-delete p {
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.5;
}

.modal-delete button {
  padding: 8px 16px;
  font-size: 14px;
  background: linear-gradient(to right, #00dbff, #ff00ff);
  border: none;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* 开篇提示模态框样式 */
.welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.welcome-modal.active {
  visibility: visible;
  opacity: 1;
}

.welcome-modal .welcome-modal-content {
  background: rgba(0, 10, 30, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 219, 255, 0.3);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  color: #fff;
  width: 85%;
  max-width: 450px;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 219, 255, 0.1);
  animation: modalAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 70px;
  min-height: 400px;
}

/* 科技感动态头部 */
.welcome-modal .welcome-modal-content .tech-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 5;
  border-radius: 16px;
  background-color: transparent;
}

/* Canvas 元素占满容器 */
.welcome-modal .welcome-modal-content #techCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
}

/* 文字内容区域 */
.welcome-modal .welcome-modal-content h2,
.welcome-modal .welcome-modal-content p,
.welcome-modal .welcome-modal-content ul,
.welcome-modal .welcome-modal-content button {
  position: relative;
  z-index: 10;
}

.welcome-modal .welcome-modal-content h2 {
  color: #00dbff;
  font-size: 28px;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(0, 219, 255, 0.5);
  position: relative;
  z-index: 10;
  background-color: rgba(0, 10, 30, 0.6);
  padding: 10px;
  border-radius: 10px;
  display: inline-block;
}

.welcome-modal .welcome-modal-content p {
  opacity: 0.9;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.5;
  background-color: rgba(0, 10, 30, 0.6);
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
}

.welcome-modal .welcome-modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  background-color: rgba(0, 10, 30, 0.6);
  border-radius: 10px;
  padding: 12px 24px;
}

.welcome-modal .welcome-modal-content ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: #fff;
  display: block;
}

.welcome-modal .welcome-modal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: #00dbff;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 219, 255, 0.8);
}

.welcome-modal .welcome-modal-content button {
  background: linear-gradient(90deg, #00dbff, #0087ff);
  border: none;
  border-radius: 30px;
  color: #fff;
  padding: 12px 32px;
  margin: 16px auto 12px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 
    0 5px 15px rgba(0, 139, 255, 0.4),
    0 3px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  background-color: rgba(0, 10, 30, 0.7);
}

.welcome-modal .welcome-modal-content button:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 
              0 2px 5px rgba(0, 219, 255, 0.4);
}

.welcome-modal .welcome-modal-content button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.welcome-modal .welcome-modal-content button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 30%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(25deg);
  transition: 0.8s;
}

.welcome-modal .welcome-modal-content button:hover::after {
  left: 150%;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .welcome-modal .welcome-modal-content {
    padding: 24px;
    width: 90%;
  }
  
  .welcome-modal .welcome-modal-content h2 {
    font-size: 22px;
    margin-bottom: 16px;
  }
  
  .welcome-modal .welcome-modal-content p {
    font-size: 15px;
    margin-bottom: 18px;
  }
  
  .welcome-modal .welcome-modal-content button {
    padding: 10px 24px;
    font-size: 15px;
  }
}

/* 登录按钮样式 */
.login-button {
  position: static;
  margin: 15px 15px 0px;
  width: calc(100% - 30px);
  padding: 8px 0;
  background: transparent;
  border: 1px solid rgba(0, 219, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-button svg {
  width: 16px;
  height: 16px;
}

.login-button:hover {
  opacity: 0.9;
}

/* 关于按钮样式 */
.about-button {
  position: static;
  margin: 5px 15px 15px; /* 上间距调整为10px */
  width: calc(100% - 30px);
  padding: 8px 0;
  background: transparent;
  border: 1px solid rgba(0, 219, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.about-button svg {
  width: 16px;
  height: 16px;
}

.about-button:hover {
  opacity: 0.9;
}

/* 手册按钮样式 */
.manual-button {
  position: static;
  margin: 15px 15px 10px; /* 上间距15px，下间距10px，与关于按钮保持一致 */
  width: calc(100% - 30px);
  padding: 8px 0;
  background: transparent;
  border: 1px solid rgba(0, 219, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.manual-button svg {
  width: 16px;
  height: 16px;
}

.manual-button:hover {
  opacity: 0.9;
}

/* 备案信息样式 */
.beian {
  margin: 5px 15px 15px;
  text-align: center;
}

.beian a {
  color: #94a3b8;
  font-size: 12px;
  text-decoration: none;
  transition: font-size 0.3s ease; /* 确保字体大小平滑过渡 */
}

.beian a:hover {
  color: #00dbff;
}

.sidebar.collapsed .beian {
  margin: 10px auto; /* 统一间距 */
}

.sidebar.collapsed .beian a {
  font-size: 10px; /* 收起时缩小字体 */
  padding: 0;
  display: inline-block;
  white-space: nowrap; /* 防止换行 */
}

/* 模态框样式 */
.modal-about {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #000000, #000212, #000634);
  background-size: 200% 200%;
  animation: gradientAnimation 15s ease infinite;
  border: 2px solid rgba(0, 219, 255, 0.5);
  border-radius: 15px;
  color: #fff;
  padding: 35px 40px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
}

.modal-about.active {
  display: block;
  animation: fadeInModal 0.4s ease;
}

.modal-about h2 {
  margin-bottom: 20px;
  font-size: 28px;
  color: #00dbff;
  text-shadow: 0 0 7px rgba(0, 219, 255, 0.8);
}

.modal-about p {
  line-height: 1.8;
  margin-bottom: 25px;
  font-size: 17px;
  color: #eee;
}

.modal-about .close-button {
  padding: 10px 25px;
  font-size: 15px;
  background: transparent;
  border: 2px solid rgba(0, 219, 255, 0.7);
  border-radius: 30px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  margin-top: 15px;
}

.modal-about .close-button:hover {
  background-color: rgba(0, 219, 255, 0.2);
  border-color: #00dbff;
  color: #00dbff;
}

@keyframes gradientAnimation {
  0% {
      background-position: 0% 50%;
  }
  50% {
      background-position: 100% 50%;
  }
  100% {
      background-position: 0% 50%;
  }
}

@keyframes fadeInModal {
  from {
      opacity: 0;
      transform: translate(-50%, -60%);
  }
  to {
      opacity: 1;
      transform: translate(-50%, -50%);
  }
}

/* 自定义滚动条（仅应用于 .sidebar-menu） */
@media (min-width: 769px) {
  .sidebar-menu::-webkit-scrollbar {
      width: 6px;
  }

  .sidebar-menu::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.1);
      border-radius: 3px;
  }

  .sidebar-menu::-webkit-scrollbar-thumb {
      background: rgba(0, 219, 255, 0.3);
      border-radius: 3px;
  }

  .sidebar-menu::-webkit-scrollbar-thumb:hover {
      background: rgba(0, 219, 255, 0.5);
  }

  .sidebar-menu {
      scrollbar-width: thin;
      scrollbar-color: rgba(0, 219, 255, 0.3) rgba(0, 0, 0, 0.1);
  }
}

/* 粒子闪烁动画 */
@keyframes particle-fade {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0.8;
  }
}

/* 单个粒子样式 */
.welcome-modal .welcome-modal-content .geo-particle {
  position: absolute;
  border-radius: 50%;
  background-color: #00dbff;
  box-shadow: 0 0 4px rgba(0, 219, 255, 0.8);
}

/* 明确定义波浪动画关键帧 */
@media (min-width: 769px) {
  .welcome-modal .welcome-modal-content {
    padding-top: 60px;
  }
  
  .welcome-modal .welcome-modal-content::before {
    height: 60px;
  }
  
  .welcome-modal .welcome-modal-content h2 {
    margin-top: 0;
  }
}

/* 渐变背景增强效果 */
.welcome-modal .welcome-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(
    to bottom,
    rgba(0, 152, 255, 0.15) 0%,
    rgba(0, 219, 255, 0.1) 50%,
    transparent 100%
  );
  z-index: 1;
}