/* @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap'); */

@font-face {
    font-family: 'Noto Sans SC';
    src: url('../fonts/NotoSansSC-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'Noto Sans SC';
    src: url('../fonts/NotoSansSC-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}

/* 以下为 index.html 内联样式自动分离 */
:root {
    --primary-color: #ffffff;
    --secondary-color: #f1f1f1;
    --accent-color: #4a89dc;
    --dark-bg: #121212;
    --overlay-bg: rgba(0, 0, 0, 0.3);
    --border-radius: 10px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-standard: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: var(--dark-bg);
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    overflow-x: hidden;
    cursor: url('../img/mouse.png'), auto;
}
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    z-index: 1;
}
.container {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--overlay-bg);
}
.content {
    text-align: center;
    color: var(--primary-color);
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

.logo img {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-in;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-standard);
}

.title {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    letter-spacing: 3px;
}

/* 导航栏样式 - 美化版 */
.navigation {
    margin: 2.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 0.5rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.nav-item {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    font-size: 1.1rem;
    position: relative;
    opacity: 0.85;
    transition: all 0.3s ease;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.nav-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
    opacity: 1;
}

.nav-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    transform: skewX(-25deg);
    transition: all 0.4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    z-index: -1;
}

.nav-item:hover:before {
    width: 100%;
}

/* 当前项目指示器 */
.nav-item.active {
    opacity: 1;
    font-weight: 500;
    background: rgba(74, 137, 220, 0.25);
    box-shadow: 0 4px 12px rgba(74, 137, 220, 0.3);
}

.hitokoto {
    margin: 2rem auto;
    font-style: normal;
    opacity: 0.9;
    max-width: 600px;
    padding: 0 1rem;
}

.hitokoto-text {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.hitokoto-from {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center; /* 修改为居中显示 */
    font-style: italic;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

.avatar img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid rgba(255, 255, 255, 0.8);
    transition: transform var(--transition-normal);
}

.avatar img:hover {
    transform: scale(1.1);
}

.name {
    font-size: 2rem;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.bio {
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    font-size: 1.1rem;
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面区块 */
.section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s ease, backdrop-filter 0.4s ease;
    visibility: hidden;
    
    /* 毛玻璃效果 */
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.section:target {
    transform: translateY(0);
    visibility: visible;
}

.back-btn {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: rgba(255, 255, 255, 0.1);
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
    color: var(--primary-color);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    /* 移除底部内边距，因为不再需要下划线空间 */
    /* padding-bottom: 1rem; */
    display: inline-block;
}

/* 移除标题下划线
.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}
*/

.about-content {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.about-avatar {
    flex: 1;
    text-align: center;
}

.about-avatar img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transition: transform var(--transition-normal);
}

.about-info {
    flex: 2;
    min-width: 300px;
}

.about-info h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0;
}

.skill-tag {
    padding: 0.4rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.about-social {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.about-social a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
    display: inline-block;
}

.about-social a:hover {
    transform: translateY(-3px);
    color: var(--accent-color);
}

/* 留言板样式 */
.guestbook-intro {
    margin-bottom: 2rem;
    text-align: center;
}

.guestbook-notice {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

.loading-message {
    color: var(--primary-color);
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
}

/* Giscus 容器样式 */
.giscus-container {
    width: 100%;
    min-height: 300px;
    margin: 1rem auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
}

/* 确保noscript标签在禁用JavaScript时正确显示 */
.giscus-container noscript {
    color: var(--primary-color);
    text-align: center;
    display: block;
    padding: 2rem 0;
}

/* Giscus暗色主题自定义 */
.giscus-frame {
    border: none !important;
    width: 100% !important;
    min-height: 300px !important;
    background: transparent !important;
}

/* 修复Giscus框架加载问题 */
.giscus {
    width: 100% !important;
    margin: 0 !important;
}

/* 更好的暗色主题支持 */
.giscus-frame {
    color-scheme: dark;
    background-color: transparent !important;
}



/* 页脚 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* 移除黑色背景 */
    /* background-color: rgba(0, 0, 0, 0.7); */
    color: var(--primary-color);
    text-align: center;
    padding: 1rem 0;
    z-index: 10;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    /* 添加文本阴影增加可读性 */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* 自定义滚动条 */
.section::-webkit-scrollbar {
    width: 8px;
}

.section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* 响应式设计优化 */
@media screen and (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .about-avatar {
        margin-bottom: 1rem;
    }

    .skill-tags {
        justify-content: center;
    }

    .content {
        padding: 1.5rem;
        width: 95%;
    }

    .title {
        font-size: 1.8rem;
    }

    /* 导航在平板上保持横向 */
    .navigation {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
        padding-bottom: 0.8rem;
    }

    .social-links {
        gap: 1rem;
    }
    

    
    /* 优化滚动区域 */
    .section {
        padding-bottom: 4rem;
    }
}

@media screen and (max-width: 480px) {
    .section {
        padding: 1.5rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .about-avatar img {
        width: 150px;
        height: 150px;
    }

    .hitokoto-text {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 0.8rem 0;
        font-size: 0.8rem;
    }
    
    /* 移动端导航调整为纵向排列 */
    .navigation {
        flex-direction: column;
        gap: 1rem;
        border-bottom: none;
        max-width: 100%;
    }
    
    .nav-item {
        padding: 0.4rem 0;
        /* 移除底部边框 */
        /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
        width: 50%;
    }
    
    .nav-item.active {
        /* 移除底部边框宽度 */
        /* border-bottom-width: 2px; */
    }
    
    /* 调整移动端间距 */
    .content {
        padding: 1rem;
    }
    
    .hitokoto {
        margin: 1.5rem auto;
    }
    
    /* 改进滚动体验 */
    .section::-webkit-scrollbar {
        width: 4px;
    }
}

#global-loading {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: opacity 0.5s;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-top: 5px solid #4a89dc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
#global-loading.hide {
  opacity: 0;
  pointer-events: none;
}

.ripple-effect {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(74, 137, 220, 0.25);
  transform: scale(0);
  animation: ripple-animate 0.6s cubic-bezier(0.4,0,0.2,1);
  z-index: 9999;
}
@keyframes ripple-animate {
  to {
    transform: scale(6);
    opacity: 0;
  }
}

a, button, .nav-item, .back-btn {
  cursor: url('/assets/img/mouse.png'), auto !important;
}

/* ====== 友链板块样式 ====== */
.friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  justify-content: flex-start;
}
.friend-item {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--primary-color);
  box-shadow: var(--shadow-standard);
  min-width: 220px;
  max-width: 320px;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 0.5rem;
}
.friend-item:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.friend-item img {
  margin-right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  background: #fff;
}
.friend-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}
.friend-desc {
  font-size: 0.95em;
  color: #bdbdbd;
  opacity: 0.85;
}
.friend-submit {
  background: rgba(255,255,255,0.04);
  border-radius: var(--border-radius);
  padding: 1.5rem 1rem 1rem 1rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-standard);
  max-width: 400px;
}
.friend-submit h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.15rem;
  font-weight: 500;
}
#friend-link-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
#friend-link-form input,
#friend-link-form textarea {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  color: var(--primary-color);
  font-size: 1rem;
  outline: none;
  transition: background var(--transition-fast);
}
#friend-link-form input:focus,
#friend-link-form textarea:focus {
  background: rgba(255,255,255,0.18);
}
#friend-link-form button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  margin-top: 0.5rem;
}
#friend-link-form button:hover {
  background: #357ab8;
  transform: translateY(-2px) scale(1.04);
}
#friend-link-result {
  margin-top: 0.5rem;
  color: #6cf;
  font-size: 0.98rem;
}
@media screen and (max-width: 768px) {
  .friends-list {
    flex-direction: column;
    align-items: stretch;
  }
  .friend-item {
    max-width: 100%;
    min-width: 0;
  }
  .friend-submit {
    max-width: 100%;
  }
}

.avatar-round { border-radius: 50%; }
.mb-05 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 2rem; }
.friend-result { margin-top: 0.5rem; color: #6cf; }

/* 个人导航板块样式 */
.navigation-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    opacity: 0.9;
}

.navigation-categories {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.nav-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-category:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.nav-category h3 {
    color: var(--primary-color);
    margin: 0 0 1.2rem 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-category h3 i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

.nav-links {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.nav-link-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link-item:hover:before {
    opacity: 1;
}

.nav-link-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.nav-icon {
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-link-item:hover .nav-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.2);
}

.emoji-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-link-item:hover .emoji-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
}

.nav-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.nav-link-item:hover .nav-name {
    color: var(--accent-color);
}

.nav-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

.nav-link-item:hover .nav-desc {
    opacity: 1;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .navigation-categories {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
    
    .nav-category {
        padding: 1.2rem;
    }
    
    .nav-links {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .nav-link-item {
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .nav-icon {
        width: 32px;
        height: 32px;
        padding: 3px;
    }
    
    .emoji-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    /* 修改主页面导航样式，在平板上改为网格布局 */
    .navigation {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        width: 90%;
        max-width: 450px;
        padding: 0.5rem 0;
    }
    
    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .nav-links {
        gap: 0.75rem;
        grid-template-columns: 1fr;
    }
    
    .nav-link-item {
        padding: 0.7rem;
        gap: 0.6rem;
    }
    
    .nav-icon {
        width: 30px;
        height: 30px;
        padding: 2px;
    }
    
    .emoji-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .nav-category h3 {
        font-size: 1.1rem;
    }
    
    /* 移动端导航恢复为纵向单列居中 */
    .navigation {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
        padding: 0.5rem 0;
    }
    .nav-item {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
        width: auto;
        min-width: unset;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
