/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f5; /* 浅灰背景色 */
    background-image: url('../images/bg2.jpg'); /* 添加背景图案 */
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative; /* 确保背景图在最底层 */
    z-index: 1; /* 确保背景图在最底层 */
}

/* 顶栏样式 */
.header {
    width: 100%;
    background: linear-gradient(90deg, #4a90e2, #0073e6); /* 渐变蓝色 */
    padding: 10px 0; /* 减少内边距 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 1000; /* 确保顶栏在最上层 */
}

.header-content {
    display: flex;
    align-items: center;
    max-width: 1000px;
    width: 100%;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.header-title {
    font-size: 42px; /* 放大字体 */
    color: #ffffff; /* 白色字体 */
    font-weight: bold;
    font-family: 'Brush Script MT', cursive; /* 使用艺术字体 */
    text-align: center; /* 居中显示 */
}

/* 信息流容器 */
.content {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 每行三个卡片 */
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    margin-top: 160px; /* 为了避免内容被固定的顶栏遮挡 */
    box-sizing: border-box;
    z-index: 2; /* 确保卡片浮在背景图上面 */
}

/* 卡片样式 */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    position: relative; /* 使按钮位置相对于卡片 */
    min-height: 320px; /* 设置最小高度，避免重叠 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2; /* 确保卡片浮在背景图上面 */
}

.card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.card-description {
    font-size: 16px;
    color: #333333;
    margin: 15px 0;
}

/* 按钮样式 */
.card-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: auto; /* 将按钮推到卡片底部 */
}

.download-btn, .share-btn {
    background: linear-gradient(90deg, #0073e6, #4a90e2); /* 渐变蓝色 */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.download-btn:hover, .share-btn:hover {
    background: linear-gradient(90deg, #005bb5, #006bb3); /* 深蓝色渐变 */
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr; /* 小屏幕下每行显示1个卡片 */
    }
}

/* 底栏样式 */
.footer {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e7e7e7;
    position: relative;
    bottom: 0;
    width: 100%;
    z-index: 2; /* 确保底栏浮在背景图上面 */
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer a {
    color: #333;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001; /* 确保弹窗在最上层 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.share-options {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.share-option {
    text-align: center;
}

.share-option img {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.share-option p {
    margin-top: 5px;
    font-size: 14px;
    color: #333;
}