/* --- 全局与基础样式 --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #e0e0e0; /* 浅灰色文字 */
    background-color: #0a0a1a; /* 深蓝紫色背景 */
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto; /* 内容高度自适应 */
    place-items: start center; /* 垂直方向顶部对齐，水平方向居中 */
    padding-top: max(calc(17.5vh - 15px), 0px); /* 顶部留白 */
    overflow-x: hidden; /* 防止水平滚动条 */
    position: relative; /* 为绝对定位的背景元素提供基准 */
}

/* --- 星空背景动画 --- */
@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}
@keyframes move-clouds-back {
    from { background-position: 0 0; }
    to { background-position: 10000px 0; }
}

.stars-bg, .twinkling, .clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -2; /* 置于最底层 */
}

.stars-bg {
    background: #0a0a1a url('../assets/img/stardust.png'); /* 简单的星星纹理 */
    /* 如果想要更复杂的背景图，可以在这里替换 */
    z-index: -3;
}

.twinkling {
    background: transparent url('../assets/img/twinkle-twinkle.png') repeat top center; /* 闪烁效果纹理 */
    animation: move-twink-back 200s linear infinite;
    z-index: -2;
    opacity: 0.7;
}

.clouds {
    background: transparent url('../assets/img/foggy-birds.png') repeat top center; /* 云雾效果纹理 */
    animation: move-clouds-back 200s linear infinite;
    opacity: 0.3; /* 云雾比较淡 */
    z-index: -1;
}

/* 导航栏样式 */
.nav-container {
    position: absolute;
    top: 20px;
    right: 0; /* 靠右对齐 */
    z-index: 10; /* 确保导航栏在其他内容之上 */
    width: auto; /* 宽度自适应 */
    height: auto; /* 高度自适应 */
    overflow: hidden; /* 隐藏溢出内容 */
    transition: width 0.3s ease; /* 添加过渡效果 */
    background-color: rgba(25, 25, 45, 0.7); /* 半透明深蓝紫色背景 */
    border-radius: 5px;
}

.nav-container:not(:hover) {
    width: 50px; /* 初始宽度，只显示菜单图标 */
    height: 38px; 
}

.nav-container:hover {
    width: 150px; /* 展开后的宽度 */
}

.nav-toggle {
    color: #fff;
    font-size: 1.2em; /* 增大字体大小 */
    padding: 8px 12px; /* 增加内边距 */
    cursor: pointer;
    display: flex; /* Flex 布局 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

.nav-toggle-content {
    display: flex; /* Flex 布局 */
    align-items: center; /* 垂直居中 */
    justify-content: flex-start; /* 左对齐 */
}

.nav-text {
    margin-left: 5px; /* 增加与图标之间的距离 */
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden; /* 隐藏溢出文字 */
    width: 0; /* 初始宽度为 0 */
    transition: width 0.3s ease; /* 添加过渡效果 */
}

.nav-container:not(:hover) .nav-text {
    width: 0; /* 初始状态下隐藏文字 */
}

.nav-container:hover .nav-text {
    width: auto; /* 展开状态下显示文字 */
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 10px; /* 调整内边距 */
    border-radius: 5px;
    overflow: hidden;
    /* text-align: right;  移除 */
    font-size: 1.2em;
    display: flex;
    flex-direction: row; /* 水平排列 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 左对齐 */
    margin-top: auto; /* 占据上方空间，实现垂直居中 */
    margin-bottom: auto; /* 占据下方空间，实现垂直居中 */
}

.nav-menu li {
    padding: 12px 10px; /* 增加内边距 如果太长就减少这个*/
    overflow: hidden; /* 隐藏溢出内容 */
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    display: block;
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden; /* 隐藏溢出文字 */
    width: 0; /* 初始宽度为 0 */
    transition: width 0.3s ease; /* 添加过渡效果 */
}

.nav-menu a:hover {
    text-decoration: underline;
}

.nav-container:hover .nav-menu a {
    width: auto; /* 展开状态下显示文字 */
}


/* --- 内容容器与卡片 --- */
.container {
    text-align: center;
    padding: 20px;
    z-index: 1; /* 确保内容在背景之上 */
    overflow-y: auto;  允许内容垂直滚动 
    max-height: 90vh;  限制最大高度，防止内容超出屏幕 
}

.content-box {
    background: rgba(25, 25, 45, 0.7); /* 半透明深蓝紫色背景 */
    padding: 40px 50px;
    border-radius: 15px; /* 圆角 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* 阴影增加立体感 */
    backdrop-filter: blur(8px); /* 毛玻璃/模糊效果 */
    -webkit-backdrop-filter: blur(8px); /* 兼容 Safari */
    border: 1px solid rgba(255, 255, 255, 0.15); /* 细微边框 */
    max-width: 650px; /* 限制最大宽度 */
    margin: auto;
}

/* 可选的图标样式 */
.fox-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 1s ease-out 0.2s forwards, subtleBob 4s ease-in-out infinite; /* 淡入 + 轻微上下浮动 */
}

/* --- 标题与文本样式 --- */
.title {
    font-size: 2.8em; /* 稍大字体 */
    color: #ffa500; /* 温暖的橙色*/
    margin-bottom: 30px;
    font-weight: 400; /* 稍细的字体 */
    letter-spacing: 2px;
    opacity: 0; /* 初始隐藏 */
    transform: translateY(-20px); /* 初始向上偏移 */
    animation: slideDownFadeIn 1s ease-out 0.5s forwards; /* 下滑淡入动画 */
}

.intro-text p {
    font-size: 1.15em;
    line-height: 1.9; /* 增加行高*/
    margin-bottom: 18px;
    font-weight: 400; /* 改粗*/
    opacity: 0; /* 初始隐藏 */
    transform: translateY(15px); /* 初始向下偏移 */
    /* 动画由 JS 添加延迟并触发 */
    animation: slideUpFadeIn 0.8s ease-out forwards;
    animation-play-state: paused; /* 初始暂停动画，等待JS启动 */
}

.intro-text p:last-child {
    margin-bottom: 0; /* 最后一个段落无下边距 */
}



/* --- 动画关键帧 --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtleBob { /* 轻微上下浮动 */
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* --- 响应式调整 (可选，但推荐) --- */
@media (max-width: 768px) {
    body {
        padding-top: max(calc(10vh - 10px), 0px); /* 平板上减少顶部留白 */
    }
    .content-box {
        padding: 30px 35px;
        max-width: 90%;
    }
    .title {
        font-size: 2.2em;
    }
    .intro-text p {
        font-size: 1.05em;
        line-height: 1.8;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: max(calc(8vh - 5px), 0px); /* 手机上进一步减少顶部留白 */
    }
    .content-box {
        padding: 20px 20px;
        backdrop-filter: blur(5px); /* 移动端降低模糊度可能性能更好 */
        -webkit-backdrop-filter: blur(5px);
    }
    .title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .intro-text p {
        font-size: 1em;
        line-height: 1.7;
    }
    .fox-icon {
        width: 40px;
        height: 40px;
    }
}