* {
    user-select: none;
    box-sizing: border-box;
}

html,
body {
    overflow: hidden;
    background-color: #f2ece0; /* 古朴宣纸色 */
}

body {
    margin: 0;
    position: fixed;
    width: 100%;
    height: 100%;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: invert(1); /* 反转滤镜，将渲染的流体颜色转为墨水与矿石色 */
}

.main {
    position: fixed;
    top: 30%;
    left: 0;
    right: 0;
    animation: float-drift 8s ease-in-out infinite;
    mix-blend-mode: difference; /* 开启差值混合模式，实现完全动态的背景反色效果 */
    z-index: 10;
    pointer-events: none;
}

h1 {
    font-family: 'Comfortaa', cursive;
    font-weight: 700;
    font-size: 8.5em;
    margin: 0;
    letter-spacing: -2px;
    text-align: center;
    color: #ffffff; /* 基础色为纯白，在 difference 混合下自动呈现背景的完美反转色 */
}

h2 {
    color: rgba(255, 255, 255, 0.8); /* 基础色为白微透，自动呈现背景反转色 */
    text-align: center;
    font-family: 'Noto Serif SC', 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1.4em;
    letter-spacing: 4px;
    margin-top: 22px;
    margin-bottom: 0px;
    text-transform: none; /* 允许大小写 */
}

/* 动效 */
@keyframes float-drift {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* 移动端适配 */
@media screen and (max-width: 767px) {
    .main {
        top: 25%;
    }

    h1 {
        font-size: 4.0rem;
        letter-spacing: -1px;
    }

    h2 {
        font-size: 1.0rem;
        letter-spacing: 2px;
        margin-top: 15px;
        padding: 0 20px;
    }
}

/* 页脚 按钮区域样式 */
.footer {
    position: fixed;
    bottom: 50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    pointer-events: none; /* 让容器不遮挡流体交互 */
    z-index: 10;
}

.github-btn,
.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    color: #2c2c2c; /* 深墨色 */
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 1px;
    border: 1px solid rgba(44, 44, 44, 0.2);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto; /* 允许按钮响应交互 */
    cursor: pointer;
}

.github-icon,
.blog-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.4s ease;
}

/* 悬浮与激活效果 */
.github-btn:hover,
.blog-btn:hover {
    background: rgba(44, 44, 44, 0.08);
    border-color: rgba(44, 44, 44, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px) scale(1.05);
}

.github-btn:hover .github-icon,
.blog-btn:hover .blog-icon {
    transform: rotate(360deg) scale(1.1);
}

.github-btn:active,
.blog-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 移动端适配页脚 */
@media screen and (max-width: 767px) {
    .footer {
        bottom: 30px;
        gap: 12px;
    }
    .github-btn,
    .blog-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
        letter-spacing: 0.8px;
    }
    .github-icon,
    .blog-icon {
        width: 12px;
        height: 12px;
    }
}
