/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 深色模式滚动条 */
.dark ::-webkit-scrollbar-track {
    background: #333;
}

.dark ::-webkit-scrollbar-thumb {
    background: #666;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* 链接动画效果 */
a {
    position: relative;
    overflow: hidden;
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* 搜索框聚焦效果 */
#search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 添加HTML和body样式重置 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* 背景幻灯片样式 */
.background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.background-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.background-slideshow img.active {
    opacity: 1;
}

/* 添加内容遮罩以提高文字可读性 */
.container {
    position: relative;
    z-index: 10;  
}

/* 增强文字可读性 */
h1, h2, h3, p, a, li {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

dark h1, dark h2, dark h3, dark p, dark a, dark li {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* 板块进入动画 */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 点击波纹动画 */
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s linear;
}

/* 引导页样式 */
#intro-screen {
    cursor: pointer;
}

#intro-image {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

#intro-image.active {
    opacity: 1;
}

#intro-prompt {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* 主内容渐显动画 */
#main-content {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#main-content.visible {
    opacity: 1;
}

/* 页面切换渐变动画 */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.page-enter {
    animation: pageFadeIn 0.5s ease-out forwards;
}

.page-exit {
    animation: pageFadeOut 0.5s ease-in forwards;
}

/* 云上趣事板块高亮 */
.cloud-fun-section {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}
.cloud-fun-title {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 1px 3px rgba(0, 0, 0, 0.5);
}
