/* 通用样式 */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'WenQuanYi Micro Hei', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* 更柔和的背景色 */
    color: #333;
}

.container {
    width: 95%;
    max-width: 1200px; /* 稍微加宽以适应现代屏幕 */
    margin: 0 auto;
    padding: 10px 20px;
}

/* 头部导航 */
.header {
    background-color: #fff;
    border-bottom: 1px solid #ddd; /* 稍微加深边框 */
    padding: 5px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* 添加轻微阴影 */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    text-decoration: none;
}

.nav-links a {
    margin-left: 20px;
    color: #555;
    text-decoration: none;
    font-weight: bold;
}

.nav-links a:hover {
    color: #4CAF50;
}

/* 主要内容 */
.main-content {
    padding: 20px 0; /* 增加上下内边距 */
}

.section-card {
    background-color: #fff;
    border-radius: 8px; /* 更大的圆角 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 更明显的阴影 */
    margin-bottom: 20px; /* 增加卡片间距 */
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 添加过渡效果 */
}

.section-card:hover {
    transform: translateY(-5px); /* 悬停时轻微上浮 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); /* 悬停时阴影加深 */
}

.hero {
    text-align: center;
    padding: 20px 0;
}

.hero .class-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15); /* 增加头像阴影 */
}

.hero h1 {
    color: #333; /* 标题颜色改为深色 */
    margin: 5px 0;
    font-size: 28px; /* 加大字号 */
    font-weight: 700;
}

.hero p {
    color: #777;
    font-size: 16px;
}

.about-hero {
    background-color: #e8f5e9;
}

/* 班训和口号 */
.slogan-box {
    background-color: #f8f9fa; /* 更亮的背景 */
    border: none; /* 移除边框 */
    border-radius: 10px; /* 圆角 */
    padding: 25px;
    margin-top: 20px;
    text-align: center;
}

.slogan-box h3 {
    color: #28a745; /* 保持品牌绿色 */
    margin-top: 0;
    font-size: 24px;
    margin-bottom: 25px;
}

.thought-item {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thought-icon,
.power-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #28a745;
    color: #fff;
    border-radius: 50%;
    width: 50px; /* 增大图标尺寸 */
    height: 50px;
    font-size: 18px; /* 调整字体大小 */
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.thought-item p {
    margin: 4px 0;
    color: #555;
    font-size: 16px;
}

.thought-item p .thought-title {
    font-weight: bold;
    color: #333;
    margin-right: 8px;
}

.power-items {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.power-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* 增加标签间隙 */
}

.power-tags span {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #218838); /* 使用渐变背景 */
    color: #fff;
    padding: 10px 20px; /* 增加内边距 */
    border-radius: 20px; /* 胶囊形状 */
    margin: 0; /* 移除外边距 */
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.power-tags span:hover {
    transform: scale(1.05); /* 悬停时放大 */
}


/* 荣誉墙 */
.honor-item {
    text-align: center;
    padding: 20px;
    border: none; /* 移除边框 */
    border-radius: 10px;
    margin-top: 20px;
    background-color: #f8f9fa;
    padding: 20px;
}

.honor-item img {
    width: 70px; /* 增大图标 */
    height: 70px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); /* 给图片加阴影 */
}

.honor-item p {
    margin: 5px 0;
    color: #555;
    font-size: 16px;
}

.more-link {
    float: right;
    color: #28a745;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.more-link:hover {
    color: #218838;
}

/* 新的班训/班级口号样式 */
.motto-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 40px auto;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #2E8B57, #32CD32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 50px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section {
    margin-bottom: 50px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28A745, #20C997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.section-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
}

.three-thoughts {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.thought-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px 30px;
    border-radius: 15px;
    border-left: 5px solid #28A745;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.thought-item:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.thought-label {
    font-weight: bold;
    color: #2E8B57;
    margin-right: 15px;
    font-size: 1.1rem;
}

.thought-content {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

.four-forces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.force-item {
    background: linear-gradient(135deg, #28A745, #20C997);
    color: white;
    padding: 20px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.force-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.force-item:hover::before {
    left: 100%;
}

.force-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(40, 167, 69, 0.35);
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #28A745, transparent);
    margin: 40px 0;
    border-radius: 2px;
}

/* 班训部分的新样式 */
.slogan-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slogan-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #2E8B57, #32CD32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slogan-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #28A745, transparent);
    margin: 20px 0;
    border-radius: 2px;
}

.power-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.power-item {
    background: linear-gradient(135deg, #28A745, #20C997);
    color: white;
    padding: 15px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.power-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.power-item:hover::before {
    left: 100%;
}

.power-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(40, 167, 69, 0.35);
}

@media (max-width: 768px) {
    .motto-container {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .main-title {
        font-size: 1.6rem;
    }
    
    .four-forces {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .slogan-container {
        padding: 20px 15px;
        margin: 5px;
    }
    
    .slogan-title {
        font-size: 1.6rem;
    }
    
    .power-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.motto-container > * {
    animation: fadeInUp 0.6s ease forwards;
}

.motto-container .section:nth-child(2) {
    animation-delay: 0.1s;
}

.motto-container .section:nth-child(3) {
    animation-delay: 0.2s;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50; /* 更现代的深色 */
    color: #ecf0f1; /* 更柔和的文字颜色 */
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed; /* 固定定位 */
    z-index: 1; /* 位于顶部 */
    left: 0;
    top: 0;
    width: 100%; /* 全屏 */
    height: 100%; /* 全屏 */
    overflow: auto; /* 允许滚动 */
    background-color: rgba(0,0,0,0.4); /* 黑色半透明背景 */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% 从顶部，居中 */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* 可根据需要调整宽度 */
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    text-align: center;
    color: #4CAF50;
    margin-bottom: 20px;
}

.modal-content form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content form input[type="text"],
.modal-content form textarea,
.modal-content form input[type="file"] {
    width: calc(100% - 22px); /* 减去 padding 和 border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-content form textarea {
    resize: vertical; /* 允许垂直调整大小 */
    min-height: 100px;
}

.modal-content form button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.modal-content form button:hover {
    background-color: #45a049;
}

/* 帖子网格布局 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.post-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px; /* 添加外边距，使单栏帖子之间有间隔 */
    min-height: 400px; /* 设置最小高度 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-align: center;
}

/* 发布新分享按钮 (FAB 样式) */
.fab {
    position: fixed; /* 固定定位 */
    bottom: 30px; /* 距离底部 30px */
    right: 30px; /* 距离右侧 30px */
    background-color: #4CAF50; /* 绿色背景 */
    color: white; /* 白色文字 */
    border-radius: 50%; /* 圆形 */
    width: 60px; /* 宽度 */
    height: 60px; /* 高度 */
    display: flex; /* 弹性布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    font-size: 36px; /* 加号字体大小 */
    text-decoration: none; /* 无下划线 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 阴影 */
    z-index: 1000; /* 确保在其他内容之上 */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.fab:hover {
    background-color: #45a049; /* 悬停颜色 */
    transform: scale(1.1);
}

.post-item h3 {
    color: #4CAF50;
    margin: 0 0 10px 0; /* 调整 margin */
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0; /* 防止标题被压缩 */
}

.post-item p {
    color: #555;
    flex-grow: 1; /* 让内容填充剩余空间 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    overflow: hidden; /* 隐藏溢出的内容以保持布局一致 */
    margin: 0 0 15px 0; /* 调整 margin */
    line-height: 1.6;
    text-overflow: ellipsis; /* 显示省略号 */
}

.post-item .media-container {
    flex-shrink: 0;
    max-height: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.post-item img, .post-item video {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover; /* 覆盖容器 */
}

.post-item small {
    color: #777;
    font-size: 12px;
    margin-top: 10px;
    text-align: right; /* 保持日期靠右 */
    display: block; /* 确保占一行 */
}

/* 班级风采画廊布局 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 400px; /* 设置最小高度 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-align: center;
}

.gallery-item img,
.gallery-item video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.gallery-item img,
.gallery-item video {
    max-width: 100%;
    height: auto; /* 保持宽高比 */
    display: block; /* 确保是块级元素 */
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 10px;
    object-fit: contain; /* 图片或视频按比例缩放，并保持内容完整 */
}

.gallery-item h3 {
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gallery-item p {
    color: #555;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* 管理员上传区域的样式 (与模态框表单样式类似) */
#adminUploadSection {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

#adminUploadSection h3 {
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

#adminUploadSection form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#adminUploadSection form input[type="text"],
#adminUploadSection form textarea,
#adminUploadSection form input[type="file"] {
    width: calc(100% - 22px); /* 减去 padding 和 border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#adminUploadSection form textarea {
    resize: vertical;
    min-height: 80px;
}

#adminUploadSection form button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#adminUploadSection form button:hover {
    background-color: #45a049;
}

.post-item .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.post-item .actions .like-button {
    background-color: #f0f2f5;
    border: none;
    padding: 6px 10px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #555;
}

.post-item .actions .like-button.liked {
    background-color: #e0f2f7;
    color: #007bff;
}

.post-item .actions .like-button:hover {
    opacity: 0.9;
}

.post-item .actions .comment-count {
    font-size: 0.9em;
    color: #777;
}

.post-item .actions .more-link {
    float: none;
}

.gallery-item .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.gallery-item .actions .like-button {
    background-color: #f0f2f5;
    border: none;
    padding: 6px 10px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #555;
}

.gallery-item .actions .like-button.liked {
    background-color: #e0f2f7;
    color: #007bff;
}

.gallery-item .actions .like-button:hover {
    opacity: 0.9;
}

.gallery-item .actions .comment-count {
    font-size: 0.9em;
    color: #777;
}

.gallery-item .actions .more-link {
    float: none;
}

.post-item img, .post-item video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 10px;
    object-fit: contain; /* 图片或视频按比例缩放，并保持内容完整 */
} 

.thought-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #28A745;
    border-left: 6px solid #28A745;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.thought-card:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #20C997;
    background: rgba(255, 255, 255, 0.95);
}

.thought-label {
    font-weight: bold;
    color: #2E8B57;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.thought-content {
    color: #1a1a1a;
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
    padding: 5px 0;
    text-align: center;
    background: linear-gradient(to right, #28A745, #20C997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
} 

/* 移动端优化 */
@media (max-width: 768px) {
    .motto-container {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .main-title {
        font-size: 1.6rem;
    }
    
    .four-forces {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .slogan-container {
        padding: 20px 15px;
        margin: 5px;
    }
    
    .slogan-title {
        font-size: 1.6rem;
    }
    
    .power-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* 日常分享页面优化 */
    .post-item {
        min-height: auto; /* 移除固定高度 */
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .post-item h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .post-item p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .post-item .actions {
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 8px;
    }
    
    .like-button, .more-link {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .comment-count {
        font-size: 0.9rem;
    }
    
    /* 班级风采页面优化 */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        min-height: auto; /* 移除固定高度 */
        padding: 15px;
    }
    
    .gallery-item h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .gallery-item p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    /* 模态框优化 */
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .modal-content h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .modal-content form input[type="text"],
    .modal-content form textarea {
        padding: 8px;
        font-size: 0.95rem;
    }
    
    /* 悬浮按钮优化 */
    .fab {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    /* 导航栏优化 */
    .nav-links {
        font-size: 0.9rem;
    }
    
    .nav-links a {
        margin-left: 12px;
    }
    
    .logo {
        font-size: 20px;
    }
}

/* 小屏幕手机额外优化 */
@media (max-width: 375px) {
    .container {
        width: 98%;
        padding: 8px 20px;
    }
    
    .nav-links a {
        margin-left: 8px;
        font-size: 0.85rem;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .post-item, .gallery-item {
        padding: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .fab {
        width: 45px;
        height: 45px;
        font-size: 22px;
        bottom: 15px;
        right: 15px;
    }
} 

/* 日常分享页面 */
#postsContainer {
    display: flex;
    flex-direction: column;
    gap: 20px; /* 帖子之间的间距 */
    align-items: center; /* 居中显示帖子 */
}

.post-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 80%; /* 设置帖子宽度，根据需要调整 */
    max-width: 800px; /* 最大宽度，防止过宽 */
    position: relative; /* 使内部绝对定位的元素相对于此元素 */
    margin-bottom: 20px; /* 调整为与 gallery-item 相同的底部外边距 */
    min-height: 400px; /* 设置最小高度 */
    overflow: hidden; /* 隐藏溢出内容 */
    display: flex;
    flex-direction: column;
}

.post-author-date {
    display: block;
    color: #888;
    margin: 10px 0;
    text-align: right; /* 确保日期靠右 */
    position: static; /* 恢复为流式布局，因为父元素已是 flex */
    bottom: auto;
    right: auto;
}

/* 班级风采页面点赞按钮样式，应用于日常分享 */
.post-item .like-button {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.post-actions-fixed {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f8f8; /* 背景色，使其可见 */
    padding: 10px 20px; /* 填充 */
    border-top: 1px solid #eeeeee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.post-actions-fixed .like-button,
.post-actions-fixed .more-link,
.post-actions-fixed .comment-count {
    flex: 1;
    text-align: center;
    white-space: nowrap; /* 防止文本换行 */
}

.post-actions-fixed .more-link {
    text-decoration: none;
    color: #007bff;
}

.search-bar {
    display: flex;
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px; /* 限制搜索栏的最大宽度 */
    margin: 0 auto; /* 新增：搜索栏居中 */
    justify-content: center; /* 搜索栏居中 */
}

.search-bar input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px 0 0 5px; /* 左侧圆角 */
    outline: none;
}

.search-bar button {
    padding: 10px 15px;
    background-color: #28a745; /* 绿色 */
    color: white;
    border: 1px solid #28a745;
    border-radius: 0 5px 5px 0; /* 右侧圆角 */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #218838;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .post-item {
        width: 95%; /* 小屏幕下更宽 */
    }

    .search-bar {
        flex-direction: column; /* 小屏幕下搜索框和按钮垂直排列 */
        align-items: center;
    }

    .search-bar input[type="text"],
    .search-bar button {
        width: 100%;
        border-radius: 5px; /* 小屏幕下按钮和输入框都圆角 */
        margin-bottom: 10px;
    }
} 