/* 优化后的滚动条样式 - 提高可见性 */
::-webkit-scrollbar {
    width: 10px; /* 稍微加宽，更容易识别 */
    height: 10px;
}

/* 滚动条轨道 - 浅灰色带轻微圆角 */
::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

/* 滚动条滑块 - 提高默认可见性 */
::-webkit-scrollbar-thumb {
    background: #fe8cbf66; /* 增加不透明度，更易识别 */
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box; /* 边框透明，形成内边距效果 */
    transition: background-color 0.3s ease;
}

/* 滑块悬停状态 - 加深颜色 */
::-webkit-scrollbar-thumb:hover {
    background-color: #fe8cbfaa;
}

/* 滑块激活状态 - 完全显示主色 */
::-webkit-scrollbar-thumb:active {
    background-color: #fe8cbf;
}

/* Firefox 滚动条样式同步优化 */
* {
    scrollbar-width: thin;
    scrollbar-color: #fe8cbf66 #f5f5f5; /* 提高对比度 */
}

/* 页面容器添加右侧内边距，避免内容被滚动条遮挡 */
body {
    padding-right: 2px;
}


/* 基础样式修复 - 防止水平滚动 */
html, body {
    overflow-x: hidden;
    width: 100%;
}


/* 统一页面容器内边距 */
.container {
    padding-left: clamp(1rem, 3vw, 1.5rem) !important;
    padding-right: clamp(1rem, 3vw, 1.5rem) !important;
    max-width: 1400px !important;
}

[id] {
    scroll-margin-top: 80px; /* 留出导航栏高度 + 额外空间 */
}

/* 基础动画定义 */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loader {
    border-top-color: #fe8cbf;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* 隐藏用于SEO但不影响视觉的内容 */
.seo-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 弹窗公告动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-animate {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 非官方声明标签样式 */
.non-official-badge {
    position: relative;
    overflow: hidden;
}

.non-official-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateX(-100%);
    animation: shine 2s infinite;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

/* 校园墙卡片悬停效果 */
.campus-card {
    transition: all 0.3s ease;
}

.campus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(114, 46, 209, 0.1);
}

/* 公众号文章卡片悬停效果 */
.article-card {
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(7, 193, 96, 0.1);
}

/* 文章来源标签样式 */
.article-source {
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 0 0 0 6px;
}

/* 全局动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}
