* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,body {
  height: 100vh;
  overflow: hidden;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@font-face {
  font-family: "Moyan1";  /* 自己起的名字，别动 */
  src: url("../font/Redressed-Regular.ttf") format("truetype");
  /* 支持：.ttf .otf .woff .woff2 都可以 */
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Moyan2";  /* 自己起的名字，别动 */
  src: url("../font/PoiretOne-Regular.ttf") format("truetype");
  /* 支持：.ttf .otf .woff .woff2 都可以 */
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Moyan3";  /* 自己起的名字，别动 */
  src: url("../font/Julee-Regular.ttf") format("truetype");
  /* 支持：.ttf .otf .woff .woff2 都可以 */
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Moyan4";  /* 自己起的名字，别动 */
  src: url("../font/乐米小雨体.ttf") format("truetype");
  /* 支持：.ttf .otf .woff .woff2 都可以 */
  font-weight: normal;
  font-style: normal;
}


.page-bg {
  position: fixed;
  top:0;left:0;
  width:100vw;height:100vh;
  z-index:-2;
}
.page-bg img {
  width:100%;
  height:100%;
  object-fit:cover;
}

.container {
  width: 92%;
  max-width: 1100px;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  position: relative;
}

.mobile-btn {
  display: none;
  position: fixed;
  top:20px;left:20px;
  z-index:9999;
  width:44px;height:44px;
  background:rgba(255,255,255,0.2);
  border-radius:10px;
  color:#fff;
  font-size:18px;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.sidebar {
  width: 260px;
  height: 100vh;
  padding: 30px 15px;
  display: flex;
  flex-direction: column;
  gap:18px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar {display:none;}

.avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px auto;
  position: relative;
  width: 110px;
  height: 110px;
}
.avatar img {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  background: #000;
}
.avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(
      #ff0080, #ff00cc, #00ccff, #00ffcc, #00ff80, #ff0080
  );
  -webkit-mask: 
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: avatarSpin 4s linear infinite;
  z-index: 1;
}
@keyframes avatarSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.card {
  background:rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  border-radius:18px;
  padding:20px;
}
.info-row {
  display:flex;align-items:center;gap:12px;margin-bottom:12px;
  font-family: "Moyan4" !important;
}
.info-row:last-child {margin:0;}

.tag-group {
  display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap;
}
.tag {
  background:rgba(0,0,0,0.4);
  padding:5px 11px;
  border-radius:8px;
  font-size:12px;
}

.timeline {
  position:relative;padding-left:28px;
}
.timeline::before {
  content:"";position:absolute;left:10px;top:15px;bottom:15px;width:2px;background:rgba(255,255,255,0.2);
}
.item {position:relative;margin-bottom:22px;}
.dot {
  position:absolute;left:-18px;top:4px;
  width:14px;height:14px;border-radius:50%;background:#fff;
}
.item.active .dot {background:#00ff88;box-shadow:0 0 8px #00ff88;}
.con p {font-size:15px;margin-bottom:2px;}
.con small {opacity:0.7;font-size:12px;}

.main {
  flex:1;
  height:100vh;
  overflow-y: auto;
  padding: 50px 30px;
  scrollbar-width: none;
  overflow-x: hidden;
}
.main::-webkit-scrollbar {display:none;}
.main-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.profile {margin-bottom:30px;}

.name {
  background:linear-gradient(90deg,#ff00cc,#00ccff,#00ff88);
  background-clip:text;
  color:transparent;
}
.profile h1 {
  font-size: 48px; /* 原44px，适当增大 */
  font-weight: 700;
  margin-bottom: 12px;
  font-family: "Moyan1" !important;
}
.bio {
  display:flex;flex-direction:column;gap:6px;margin-bottom:18px;
  font-family: "Moyan3" !important;
}
.bio p {
  display:flex;align-items:center;gap:10px;
  font-size: 18px; /* 原16px，适当增大 */
}

/* ========== 优化2：社交图标hover动画+白光+宽度扩展+名称显示 ========== */
/* 社交图标优化 —— 修复重叠 */
.social {
  display: flex !important;
  gap: 16px !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

/* 3. 图标基础样式（绝对不重叠方案） */
.social a {
  width: 45px;
  height: 45px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0; /* 关键：不压缩 */
  overflow: visible;
}

/* 4. 悬浮：加宽 + 白光动画 */
.social a:hover {
  width: 110px;
  background: rgba(255,255,255,0.3);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 12px rgba(255,255,255,0.7);
  color: rgb(0, 0, 0.3);
}

/* 5. 图标永远固定左边 */
.social a i {
  position: absolute;
  left: 13px;
  top: 50%;
  font-size: 1.25rem;
  transform: translateY(-50%);
}

/* 6. 文字在图标右边，绝对不重叠 */
.social a::after {
  content: attr(data-name);
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.social a:hover::after {
  opacity: 1;
}



.pixel-box {
  margin-bottom:40px;
  display:flex;
  justify-content: flex-start;
  width: 100%;
  /* 核心：固定矩阵的宽高比（50列*14px + 49个间隙2px = 798；8行*12px +7个间隙2px= 106） */
  aspect-ratio: 50 / 8; 
  overflow: hidden !important;
  transition: none !important;
}
.pixel-matrix {
  display:grid;
  /* 改用fr单位，自适应容器宽度 */
  grid-template-columns: repeat(50, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap:2px;
  /* 占满容器，保证比例 */
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}
.pixel {
  /* 改用百分比，适配网格单元格 */
  width: 100%;
  height: 100%;
  min-width: 2px; /* 防止缩太小看不见 */
  min-height: 2px;
  border-radius:2px;
  background:rgba(255,255,255,0.7);
}


@media (max-width: 420px) {
  .pixel-box {
    aspect-ratio: 50 / 8.5 !important; /* 微调高宽比，避免切割 */
    margin-bottom: 20px !important; /* 减少底部间距，优化布局 */
  }
  .pixel-matrix {
    gap: 0.8px !important; /* 极致缩小间隙 */
  }
}

/* 移动端兼容 */
@media (max-width:768px){
  .pixel-matrix{
      /* 移动端继承上面的fr布局，不需要单独设置 */
      grid-template-columns: repeat(50, 1fr)!important;
      grid-template-rows: repeat(8, 1fr)!important;
      aspect-ratio: 798 / 106 !important;
  }
}
.pixel.obstacle {background:rgb(8, 150, 13);}
.pixel.bug {background:#c400e0;box-shadow:0 0 6px #c400e0;}

footer {
  text-align:center;padding:20px 0;font-size:13px;opacity:0.7;
}

/* 进度条 */
.progress-container {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin: 40px 0;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: #00ff88;
  border-radius: 4px;
  box-shadow: 0 0 8px #00ff88;
  transition: width 5s ease-in-out;
}

.section {
  margin-bottom: 40px;
}
.section-title {
  font-size:22px;font-weight:600;margin-bottom:20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i {
  color: #00ff88;
  font-size: 24px;
}

/* 基础网格布局（默认4列） */
.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}
.grid-item {
  padding: 20px;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #fff;
}

/* 卡片悬浮动画（你要的效果）*/
.grid-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0,255,136,0.2);
  background: rgba(0,0,0,0.4);
}

.ties-card, .project-card {
  height: 120px;
  padding: 12px 16px !important;
  position: relative;
  width: 100%;
}
.card-top {
  font-size: 18px;
  font-weight: 600;
  position: absolute;
  top: 14px;
  left: 16px;
}
.card-middle {
  font-size: 12px;
  opacity: 0.8;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.card-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}

.skills-big-card {
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}
.skill-item i {
  font-size: 28px;
  color: #00ff88;
}
.skill-item span {
  font-size: 14px;
}

@media (max-width: 1024px) {
  .ties-grid, .project-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}



/* 断点2：屏幕宽度≤768px → 2列（替代原有1列） */
@media (max-width: 768px) {
  .mobile-btn{display:flex;align-items: center;justify-content: center;}
  .container{width:100%;}
  .sidebar{
      position:fixed;top:0;left:0;z-index:999;
      transform:translateX(-100%);
      transition:0.3s ease;
      background:rgba(0,0,0,0.7);
      width:280px;
  }
  .sidebar.show{transform:translateX(0);}
  .main{
      width:100vw;
      padding:80px 22px 20px 22px;
      overflow-x: hidden !important;
  }
  /* 矩阵样式保留之前修改的 */
  .pixel-box {
    aspect-ratio: 50 / 8 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .pixel-matrix{
      grid-template-columns: repeat(50, 1fr)!important;
      grid-template-rows: repeat(8, 1fr)!important;
      aspect-ratio: 798 / 106 !important;
  }
  /* 卡片改为2列 */
  .ties-grid, .project-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .ties-card, .project-card {
    height: 120px;
  }
}

/* 断点3：屏幕宽度≤480px → 1列（小屏兜底） */
@media (max-width: 480px) {
  .ties-grid, .project-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}


/* ========== 颜色优化：TIES / PROJECT / SKILLS ========== */
/* 1. TIES 浅亮紫色 */
.ties-section .section-title,
.ties-section .section-title i,
.ties-card .card-top {
  color: #e0b3ff !important;
}
.ties-card:hover {
  background: rgba(224, 179, 255, 0.15) !important;
}

/* 2. PROJECT 浅亮黄色 */
.project-section .section-title,
.project-section .section-title i,
.project-card .card-top {
  color: #ffeaa7 !important;
}
.project-card:hover {
  background: rgba(255, 234, 167, 0.15) !important;
}

/* 3. SKILLS 浅亮蓝色 */
.skills-section .section-title,
.skills-section .section-title i,
.skill-item i {
  color: #99e9ff !important;
}
/* -------------------------- 最终优化版 -------------------------- */
/* 仅替换这段，其他都不动 */

/* 矩阵悬浮发光（无动画） */
.pixel-box {
  transition: none !important;
}
.pixel-box:hover {
  box-shadow: 5px 5px 30px rgb(119, 214, 255) !important;
}

.ties-card:hover {
  background: rgba(255, 220, 100, 0.15) !important;
  box-shadow: 0 0 12px rgba(180, 140, 255, 0.4) !important;
  transform: translateY(-3px) scale(1.05) !important;
}
.project-card:hover {
  background: rgba(180, 140, 255, 0.15) !important;
  box-shadow: 0 0 12px rgba(255, 220, 100, 0.4) !important;
  transform: translateY(-3px) scale(1.05) !important;
}
.skill-icon {
  transition: all 0.3s ease !important;
}
/* SKILLS 图标 hover：绿色动画 + 阴影（这个一定生效！） */
.skill-item {
  transition: all 0.3s ease !important;
}
.skill-item:hover {
  background: rgba(100, 255, 140, 0.15) !important;
  box-shadow: 0 0 12px rgba(100, 255, 140, 0.4) !important;
  transform: translateY(-3px) scale(1.05) !important;
}
.skill-item:hover i {
  color: #66ff99 !important;
}









/* 音乐播放器 */
.music-player {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0;
  color: #fff;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 9999;
  overflow: hidden;
  box-sizing: border-box;
  transform: scale(1);
}

/* 鼠标悬浮：向左展开 */
.music-player:hover {
  width: 220px;
  padding: 0 15px;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.3);
  transform: scale(1.05);
  border-color: rgba(0, 255, 136, 0.5);
}

/* 左侧内容默认隐藏 */
.left-part {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 0;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  transform: translateX(20px);
}

/* 悬浮时显示 */
.music-player:hover .left-part {
  width: 150px;
  opacity: 1;
  transform: translateX(0);
}

/* 歌名：最多7个字，超出... */
.song-name {
  font-size: 14px;
  width: 80px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

.music-player:hover .song-name {
  color: #00ff88;
}

/* 按钮 */
.play-btn, .toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 6px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  transform: scale(1);
}

.toggle-btn {
  margin-left: auto;
}

.music-player:hover .toggle-btn i {
  transform: rotate(180deg) scale(1.1);
  color: #00ff88;
}

.toggle-btn i {
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.play-btn:hover, .toggle-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.play-btn:hover i, .toggle-btn:hover i {
  color: #00ff88;
}

/* 播放状态动画 */
.play-btn.playing {
  background: rgba(0, 255, 136, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
  }
}








/* 遮罩层：全屏半透明 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

/* 隐藏弹窗 */
.modal-overlay.hidden {
  display: none;
}

/* 透明卡片 */
.modal-card {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 30px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* 弹窗内容项 */
.modal-item {
  text-align: left;
}

.modal-item strong {
  display: block;
  margin-bottom: 8px;
  color: #00ff88;
}

.modal-item p {
  margin: 0;
  line-height: 1.4;
}

/* 按钮 */
.modal-btn {
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 介绍和关于弹窗样式 */
#introModal .modal-card,
#aboutModal .modal-card {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
}

#introModal .modal-card h2,
#aboutModal .modal-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #00ff88;
  font-size: 24px;
}

.modal-content {
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-content p {
  margin-bottom: 15px;
}

.modal-content h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #00ff88;
  font-size: 18px;
}






/* 侧边栏按钮单独美化----------------------------------------------- */
/* 手机端左上角菜单按钮美化 */
.mobile-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 12px !important;
  color: #fff;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 悬浮动画：发光 + 上移 + 放大 */
.mobile-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  color: #00ff88;
}

/* 点击动画：按下缩小 */
.mobile-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

/* 打开状态图标旋转 */
#menuToggle i {
  transition: transform 0.4s ease;
}
#menuToggle.active i {
  transform: rotate(180deg);
  color: #00ff88;
}