/*滚动条宽度*/
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/*滚动条轨道*/
::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 2px;
}

/*小滑块*/
::-webkit-scrollbar-thumb {
  background: rgb(76, 86, 96);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(66, 76, 86);
}

.m-font-size-text-init-title {
  line-height: 0;
  letter-spacing: 0 !important;
  font-size: 1.5em;
  font-weight: 700;
  color: #fffffc;
  align-content: center;
  font-family:'STXingkai';
  font-family: "STXingkai";
}

.bgImg {
  border-radius: 10em;
  width: 10em;
  height: 10em;
  background: url("../../images/me.jpg") no-repeat center;
  background-size: 13em;
}

.tubiao {
  user-select: none;
  margin-bottom: 0.5em
}

.tubiao a:active {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 卡片样式 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: inherit;
}

.card i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #64B5F6;
}

.card h3 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.card p {
  color: #C1CEE4;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 技术栈样式 */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.tech-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tech-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tech-icon {
  margin: auto;
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.tech-content {
  flex: 1;
}

.tech-content h3 {
  color: #ffffff;
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.075em;
}

.tech-content p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0 0 0.8rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.075em;
}

.tech-content p:last-child {
  margin-bottom: 0;
}

.tech-content strong {
  color: #ffffff;
}

/* 移动端响应式 */
@media screen and (max-width: 768px) {
  .card-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem 0;
  }

  .card {
    padding: 1rem 0.5rem;
  }

  .card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .card h3 {
    font-size: 0.9rem;
    margin: 0.5rem 0 0.3rem 0;
    line-height: 1.2;
  }

  .card p {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .tech-card {
    padding: 1.5rem;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
  }

  .tech-icon {
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
  }

  .tech-content h3 {
    font-size: 1.15rem;
  }

  .tech-content p {
    font-size: 0.85rem;
  }
}

@media screen and (max-width: 480px) {

  .card-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    padding: 1rem 0;
  }

  .card {
    padding: 0.8rem 0.4rem;
  }

  .card i {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
  }

  .card h3 {
    font-size: 0.7rem;
    margin: 0.3rem 0 0.2rem 0;
  }

  .card p {
    font-size: 0.6rem;
  }

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

  .tech-card {
    padding: 1.2rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tech-icon {
    font-size: 2rem;
    width: 45px;
    height: 45px;
  }

  .tech-content h3 {
    font-size: 1rem;
  }

  .tech-content p {
    font-size: 0.75rem;
  }
}

@media screen and (max-width: 736px) {
  .m-font-size-text-init-title {
    margin-top: 1em;
  }

  .bgImg {
    margin-top: 4em;
    background: url("../../images/me.jpg") no-repeat center;
    background-size: 13em;
  }

  .tubiao {
    margin-bottom: 2em;
    margin-top: 2em;
  }
}

@media screen and (max-width: 320px) {
  .m-font-size-text-init-title {
    font-size: 2em;
  }
}

/* 菜单按钮隐藏/显示控制 */
#header.alt #nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  transform: translateY(-10px);
}

#header:not(.alt) #nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#nav {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#two {
  background: #667eea; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}

/* 门户导航搜索框 - 匹配原有卡片风格 */
.search-container {
  max-width: 600px;
  margin: 0 auto 3rem auto;
  position: relative;
}
.search-container input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.search-container input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #64B5F6;
  outline: none;
}
.search-container .search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
}
/* 隐藏空分类 */
.category-section.hidden {
  display: none !important;
}
.card.hidden {
  display: none !important;
}

/* 门户导航大纲 TOC - 极简右侧悬浮方案 */
.portal-toc {
  position: fixed;
  top: 50%;
  right: 2rem;
  left: auto;
  transform: translateY(-50%);
  z-index: 1000;
}
.portal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
}
.portal-toc li {
  margin: 0;
}
.portal-toc a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  border-bottom: none;
  position: relative;
  outline: none;
}
.portal-toc .toc-text {
  color: #fff;
  font-size: 0.85rem;
  margin-right: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  white-space: nowrap;
}
.portal-toc .toc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  display: block;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.portal-toc a:hover .toc-text,
.portal-toc a.active .toc-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.portal-toc a:hover .toc-dot {
  background: #64B5F6;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(100, 181, 246, 0.6);
}
.portal-toc a.active .toc-dot {
  background: transparent;
  border-color: #64B5F6;
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(100, 181, 246, 0.4);
}
@media screen and (max-width: 1200px) {
  .portal-toc {
    display: none;
  }
}