.main-content {
    width: calc(100% - 200px);  /* 减去左侧导航栏宽度 */
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

.form-container {
    width: 100%;
    background-color: #0f0;
}

.image-container {
    margin: 10px;
    box-sizing: border-box;
    flex: 1 1 calc(25% - 40px); /* 4列布局 */
    transition: background-color 0.3s;  /* 平滑过渡 */
    border-radius: 0px; /* 无圆角 */
    overflow: hidden;   /* 隐藏超出部分 */
    aspect-ratio: 1/1;  /* 固定比例 */
    max-width: 300px;
}

.image-container:hover {
    background-color: #ddd; /* 鼠标移上去时变色 */
}

.image-container a {
    text-decoration: none;
    color: #333;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: fill;   /* 使图片拉伸填充 */
    display: block;
}

.image-container .caption {
    margin-top: 10px;
    text-align: center;
}

/* ----------页码样式---------- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    align-items: center;
    width: 100%;
}

.pagination a {
    color: black;
    float: left;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
}

.pagination a.active {
    background-color: #4CAF50;
    color: white;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}
/* ----------页码样式---------- */

/* ----------图片弹出样式---------- */
.modal {
    display: none;  /* 默认隐藏 */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    justify-content: center;    /* 水平居中 */
    align-items: center;    /* 垂直居中 */
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);/* 透明灰背景 */
}

.modal-content {
    margin: auto;
    display: block;
    padding: 2px;
}

.modal-first-content {
    text-align: right;
    line-height: 0px;
    margin: 0px 55px;
}

.modal-second-content {
    display: flex;
}

.modal-close {
    color: #fff;
    cursor: pointer;
    font-size: 100px;
    font-weight: bold;
    transition: 0.3s;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.modal-prev,
.modal-next {
    cursor: pointer;
    display: flex;          /* 弹性布局 */
    flex-direction: column; /* 垂直布局 */
    justify-content: center;/* 交叉轴居中 */
    width: 100px;
    color: #fff;
    font-weight: bold;
    font-size: 80px;
    text-align: center;
    transition: 0.6s ease;
    border-radius: 10px 0px 0px 10px;
    user-select: none;
    -webkit-user-select: none;
    margin: 0px 10px;
}

.modal-next {
    border-radius: 0px 10px 10px 0px;
}

.modal-prev:hover,
.modal-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ----------图片弹出样式---------- */



/* ----------响应式设计---------- */
@media (max-width: 1200px) {
    .image-container {
        flex: 1 1 calc(33.33% - 40px);/* 3列布局 */
    }
}

@media (max-width: 900px) {
    .image-container {
        flex: 1 1 calc(50% - 40px);/* 2列布局 */
    }
}

@media (max-width: 768px) {
    .main-content {
        width: 100%;
    }

    .image-container {
        flex: 1 1 calc(50% - 40px);/* 2列布局 */
    }
}

@media (max-width: 480px) {
    .image-container {
        flex: 1 1 100%;/* 1列布局 */
    }
}

/* ----------响应式设计---------- */