@charset "UTF-8";

/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0; /* 背景色设置为浅灰色 */
}

/* 头部和底部样式 */
header, footer {
    background-color: #87CEEB; /* 天蓝色背景 */
    color: white;
    text-align: center;
    padding: 1em 0;
    border-radius: 8px; /* 增加圆角 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
}

/* 菜单按钮样式 */
.menu-toggle {
    display: none;
    background-color: #87CEEB;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0.5em;
    margin-bottom: 1em;
}

/* 容器样式 */
.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto; /* 增加上下外边距 */
    padding: 1em;
    box-sizing: border-box;
    background-color: #ffffff; /* 白色背景 */
    border-radius: 12px; /* 增加圆角 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
}

/* 侧边栏样式 */
.sidebar {
    width: 20%;
    min-width: 150px;
    margin-right: 2em;
    background-color: #87CEEB; /* 天蓝色背景 */
    padding: 1em;
    border-radius: 8px; /* 增加圆角 */
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 1em 0;
}

/* 侧边栏链接样式 */
.sidebar a {
    text-decoration: none;
    color: white;
    display: block;
    padding: 0.5em;
    border-radius: 5px;
    transition: background-color 0.3s; /* 添加背景颜色过渡效果 */
}

.sidebar a:hover {
    background-color: #e6f7ff; /* 悬浮时的背景色 */
}

/* 内容区域样式 */
.content {
    width: 80%;
    max-width: 800px;
    text-align: center;
}

/* 诗文容器样式 */
.poem-container {
    background-color: white;
    padding: 1em;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 下载链接容器样式 */
.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1em;
    justify-content: center;
    font-size: 14px;
}

/* 单个下载链接样式 */
.download-link {
    padding: 0.5em 1em;
    color: #87CEEB;
    text-decoration: none;
    border: 1px solid #87CEEB;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 14px;
}

.download-link:hover {
    background-color: #87CEEB;
    color: white;
}

/* 底部版权链接样式 */
footer a,
#copyright-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

footer a:hover,
#copyright-link:hover {
    color: #e6f7ff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#copyright-link:hover {
    color: #f00;
    text-decoration: underline;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed; /* 固定位置 */
    bottom: 20px; /* 距离底部20px */
    right: 20px; /* 距离右侧20px */
    display: none; /* 初始时不显示 */
    width: 50px; /* 设置按钮宽度 */
    height: 50px; /* 设置按钮高度 */
    background-color: #87CEEB; /* 背景颜色设置为天蓝色 */
    background-image: url('istop.png'); /* 替换为你的图片路径 */
    background-size: cover; /* 背景图片覆盖整个按钮 */
    background-repeat: no-repeat; /* 防止图片重复 */
    border: none;
    border-radius: 50%; /* 圆形按钮 */
    cursor: pointer;
    text-indent: -9999px; /* 隐藏文字 */
    overflow: hidden; /* 隐藏超出内容 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    transition: background-color 0.3s, opacity 0.3s; /* 添加背景颜色和透明度的过渡效果 */
}

.back-to-top:hover {
    background-color: #00BFFF; /* 悬浮时背景颜色加深为天蓝色的较深色 */
}

/* 页面滚动时显示按钮 */
body.scrolled .back-to-top {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-right: 0;
        display: none;
    }

    .sidebar.show {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .content {
        width: 100%;
    }

    footer {
        font-size: 14px; /* 减小字体大小 */
    }

    .back-to-top {
        width: 40px; /* 减小按钮宽度 */
        height: 40px; /* 减小按钮高度 */
    }
}