/* 全局重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局变量定义 */
:root {
    /* 定义主题颜色和文本颜色 */
    --card-light: #ffffff18;
    --card-text-color: #2a2c30cc; /* 调整为更深的颜色，同时保持一定透明度 */
}

/* 自定义字体定义 */
@font-face {
    font-family: 'CascadiaNextSC';
    src: url(/fonts/CascadiaNextSC-Simplified.woff2);
}

@font-face {
    font-family: 'CEFFontsCJK';
    src: url(/fonts/CEFFontsCJK-Regular.woff2);
}

/* 基础元素样式 */
body {
    /*全局样式设置*/
    margin: 0;
    padding: 20px;  /* 改为统一的padding */
    overflow: auto;
}

/* 链接样式 */
a {
    /* 超链接样式 */
    text-decoration: none;
    color: var(--theme-dark);
}

/* 段落样式 */
p {
    margin: 0;
}

/* 自定义分隔线 */
.custom-hr {
    border: none; /* 去掉默认边框 */
    border-top: 1px solid #1d1d1d; /* 顶部边框 */
    margin: 10px auto; /* 上下外边距 */
    width: 75%; /* 分割线宽度 */
}

/* 图片基础样式 */
.css-img {
    /*图片样式*/
    width: 40px;
    border-radius: 12px;
}

/* 主要布局容器 */
.css-02 {
    /* 主要容器样式 */
    border-radius: 20px;
    display: flex;
    align-items: start;
    padding-top: 20px;
    column-gap: 40px;
}

/* 左侧卡片容器 */
.css-0201 {
    /* 卡片样式 */
    border-radius: 20px;
    background-color: var(--card-light);
    box-shadow: #0000001e 0px 5px 15px;
    backdrop-filter: blur(5px);
    width: 240px;
    padding: 40px 0 30px; /* 统一的padding格式 */
    top: 15px;
    text-align: center;
    flex-shrink: 0;
    position: sticky;
    z-index: 1000;
    font-family: 'CEFFontsCJK', sans-serif;
}

/* 响应式布局 - 移动设备 */
@media screen and (max-width: 34em) {
    .css-02 {
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
    .css-0201 {
        position: relative;
        width: 100%;
        margin-bottom: 20px;
    }
    .css-title {
        display: flex;
    }
}

/* 响应式布局 - 平板设备 */
@media screen and (min-width: 35em) {
    .css-0201 {
        display: inline-block;
    }
    .css-title {
        display: none;
    }
}

/* 响应式布局 - 桌面设备 */
@media screen and (min-width: 48em), screen and (min-width: 62em), screen and (min-width: 80em) {
    .css-0201 {
        display: inline-block;
    }
}

/* 个人介绍区域 */
.css-intro {
    /* 介绍样式 */
    border-radius: 50%;
    width: 100%;
    height: 100px;
    margin-top: 10px;
}

/* 头像样式 */
.css-avatar {
    /* 头像样式 */
    width: 100px;
    height: 100px;
    border-radius: 30%;
    cursor: pointer;
    animation: light 4.45s ease-in-out infinite;
}

/* 头像光效动画 */
@keyframes light {
    /* 动画关键帧 */
    0% { box-shadow: 0 0 24px #eaa89c; }
    50% { box-shadow: 0 0 8px #ffffff00; }
    100% { box-shadow: 0 0 24px #eaa89c; }
}

/* 个人信息区域通用样式 */
.css-name, .css-description, .css-bottom, .css-bottom1 {
    width: 100%;
    height: auto;
}

/* 名称样式 */
.css-name {
    margin-top: 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

/* 描述文本样式 */
.css-description {
    margin-top: 12px;
    padding: 0 25px 25px;
    text-align: center;
    font-size: 14px;
    color: #222;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* 描述文本悬停效果 */
.css-description p {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.css-description:hover p {
    opacity: 1;
}

/* 底部信息样式 */
.css-bottom {
    margin-top: 30px;
    font-size: 13px;
}
.css-bottom1 {
    margin-bottom: 10px;
    font-size: 13px;
}

/* 导航项样式 */
.css-020100 {
    /* 可交互容器样式 */
    border-radius: 10px;
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 8px 45px;  /* 增加左右内边距 */
    column-gap: 12px;   /* 增加图标和文字间距 */
    cursor: pointer;
    z-index: 1000;
    height: 36px;
    color: #333;
}

/* 导航项悬停效果 */
.css-020100:hover {
    /* 鼠标悬停效果 */
    background-color: #f1eeff55;
    color: #111;  /* 更深的悬停文字颜色 */
}

/* 导航图标样式 */
.css-020100 i {
    /* Tabler Icons 图标样式 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    stroke-width: 0.5;  /* 调整图标线条粗细为1 */
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
    top: 1px;
    color: inherit;  /* 继承父元素的颜色 */
}

/* 导航图标悬停效果 */
.css-020100:hover i {
    opacity: 1;  /* 悬停时完全不透明 */
}

/* 导航文本样式 */
.css-020101 {
    /* 列表项样式 */
    font-size: 14px;
    margin: 0;
    padding: 0;
    height: 20px;
    display: flex;
    align-items: center;
    line-height: 20px;
    color: inherit;  /* 继承父元素的颜色 */
}

/* 右侧内容区域样式 */
.css-0202 {
    /*列表容器样式*/display: inline-flex;
    align-items: stretch;
    flex-direction: column;
    position: relative;
    margin-bottom: 30px;
    width: 100%;
    font-family: 'CascadiaNextSC', sans-serif;
}

/* 标题样式 */
.css-title {
    position: absolute;
    right: 0;
    width: auto;
    height: auto;
    gap: 10px;
    padding-right: 10px;
    z-index: 1001;
}

/* 内容容器样式 */
.css-020200 {
    /*内部容器样式*/display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
}

/* 分类标题样式 */
.css-020222 {
    /* 列表项标题样式 */
    font-size: 16px;
    line-height: 1.33;
    margin-top: 15px;
    margin-bottom: 15px;
    font-weight: bold;
}

/* 链接卡片网格布局 */
.css-020201 {
    /* 网格布局 */
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px 20px; /* 合并行间距和列间距 */
    margin-bottom: 30px;
}

/* 响应式网格布局 */
@media screen and (min-width: 30em) {
    .css-020201 {
        grid-template-columns: repeat(1, 1fr);
    }
    body {
        padding: 15px 50px;
    }
}

@media screen and (min-width: 48em) {
    .css-020201 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 62em) {
    .css-020201 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 80em) {
    .css-020201 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (min-width: 90em) {
    .css-020201 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* 链接卡片样式 */
.css-020202 {
    /* 卡片基本样式 */
    border-radius: 20px;
    background-color: var(--card-light);
    box-shadow: #0000001e 0px 5px 15px;
    backdrop-filter: blur(5px);
    padding: 20px;
    display: flex;
    align-items: flex-start; /* 改为顶部对齐 */
    column-gap: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    top: 0;
}

/* 链接卡片悬停效果 */
.css-020202:hover {
    transform: translateY(-4px);
    box-shadow: #00000028 0px 8px 20px;
}

/* 链接卡片图标容器 */
.css-020203 {
    /* 图标容器样式 */
    flex-shrink: 0;
    width: 40px;
    height: 40px; /* 固定高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 链接卡片图标 */
.css-img {
    /* 图标样式 */
    width: 40px;
    height: 40px; /* 固定高度 */
    border-radius: 12px;
    object-fit: cover; /* 确保图片比例正确 */
}

/* 链接卡片内容容器 */
.css-020200 {
    /* 文本内容容器 */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 链接卡片标题 */
.css-020204 {
    /* 标题样式 */
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
    height: 20px; /* 固定高度 */
    overflow: hidden; /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 显示省略号 */
    white-space: nowrap; /* 不换行 */
}

/* 链接卡片描述 */
.css-020205 {
    /* 简介样式 */
    margin-top: 4px;
    font-size: 14px;
    color: var(--card-text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

/* 返回顶部按钮 */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    border-radius: 15px;
    background-color: var(--card-light);
    box-shadow: #0000001e 0px 6px 15px;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    color: #333;  /* 设置图标颜色 */
}

/* 返回顶部按钮图标 */
#backToTop i {
    font-size: 20px;
    stroke-width: 1;
}

/* 返回顶部按钮悬停效果 */
#backToTop:hover {
    color: #111;  /* 悬停时的颜色 */
}

/* 背景动画容器 */
#bgAnimate {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: -1;
     object-fit: cover;
     transition: opacity 0.5s ease-in-out;
}

/* 搜索容器 */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px auto;  /* 添加 auto 使容器水平居中 */
    width: calc(100% - 40px);  /* 考虑body的padding */
    max-width: 1200px;  /* 限制最大宽度 */
}

/* 搜索框包装器 */
.search-wrapper {
    position: relative;
    width: 50%;
    min-width: 200px;
    padding: 0 15px;
}

/* 搜索输入框 */
#searchInput {
    width: 100%;
    padding: 10px 40px 10px 15px;
    box-sizing: border-box;
    border: #1e261b3d solid 2px;
    border-radius: 15px; 
    background-color: var(--card-light);
    box-shadow: #0000001e 0px 6px 15px;
    backdrop-filter: blur(5px);
}

/* 搜索输入框焦点效果 */
#searchInput:focus {
    outline: none;
    border: #1e261b3d solid 2px; /* 保持相同的边框颜色 */
    box-shadow: #0000001e 0px 6px 15px; /* 保持相同的阴影 */
}

/* 搜索按钮 */
#searchButton {
    position: absolute;
    right: calc(15px + 8px); /* wrapper的padding + 按钮到输入框的距离 */
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 搜索图标 */
.search-icon {
    width: 22px;
    height: 22px;
    display: block;
    color: #333;  /* 更深的搜索图标颜色 */
    stroke-width: 1;
    font-size: 22px;
}

/* 搜索按钮悬停效果 */
#searchButton:hover .search-icon {
    color: #111;  /* 更深的悬停颜色 */
}

/* 响应式布局调整 */
@media screen and (max-width: 48em) {
    .search-wrapper {
        width: 100%;
    }
}

@media screen and (min-width: 48em) {
    .search-wrapper {
        width: 90%;
    }
}

@media screen and (min-width: 62em) {
    .search-wrapper {
        width: 70%;
    }
}

@media screen and (min-width: 80em) {
    .search-wrapper {
        width: 60%;
    }
}

@media screen and (min-width: 90em) {
    .search-wrapper {
        width: 50%;
    }
}

/* 搜索结果容器 */
#searchResult {
    display: none;
    margin-top: 15px;
    gap: 12px;
}

/* 警告提示样式 */
.alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff60;
    backdrop-filter: blur(5px);
    box-shadow: #00000024 0px 6px 15px;
    padding: 20px;
    border: #1e261b3d solid 2px;
    border-radius: 12px;
    z-index: 1001;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}

/* 添加全局平滑滚动 */
html {
    scroll-behavior: smooth;
    /* 添加以下属性以获得更好的滚动效果 */
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scroll-padding-top: 20px;
}

/* 优化滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}