/* 覆盖 main 容器的固定高度 */
.main {
    height: auto !important; /* 使用 !important 确保覆盖旧样式 */
    padding-bottom: 50px;
}

/* 清除浮动，确保瀑布流容器在轮播图下方正确显示 */
.clear-float {
    clear: both;
}

#waterfall-container {
    margin: 20px auto 0;
    display: flex;
    gap: 15px;
    width: 100%;
}

.waterfall-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

#waterfall-container img {
    width: 100%;
    height: auto;
    display: block;
    break-inside: avoid; /* 防止图片在列中被分割 */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

#waterfall-container img:hover {
    transform: scale(1.03);
}

.pagination {
    text-align: center;
    padding: 40px 0;
}

.pagination button {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: #0056b3;
}

.pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.pagination span {
    font-size: 16px;
    color: #333;
    margin: 0 10px;
}

#page-input {
    width: 60px;
    padding: 10px;
    margin: 0 5px;
    text-align: center;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#jump-btn {
    padding: 10px 15px;
}


/* 响应式布局 */
@media (max-width: 1200px) {
    /* With JS-based columns, this media query for column-count is no longer needed.
       Responsiveness will be handled in JS if required. */
}

@media (max-width: 800px) {
    /* With JS-based columns, this media query for column-count is no longer needed. */
}

@media (max-width: 500px) {
    /* With JS-based columns, this media query for column-count is no longer needed. */
}

/* Styles for individual waterfall items */
.waterfall-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden; /* Ensures image corners are rounded */
    margin-bottom: 0; /* Replaced by gap in .waterfall-column */
    break-inside: avoid-column; /* For column layout */
}

.waterfall-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.waterfall-item img {
    width: 100%;
    height: auto;
    display: block;
    /* Removed border-bottom: 1px solid #eee; */
}

.waterfall-item h3 {
    font-size: 1.1em;
    margin: 10px 10px 5px 10px;
    color: #333;
    word-wrap: break-word;
}

.waterfall-item .post-author {
    font-size: 0.9em;
    color: #666;
    margin: 0 10px 10px 10px;
}

.waterfall-item .post-author a {
    color: #007bff;
    text-decoration: none;
}

.waterfall-item .post-author a:hover {
    text-decoration: underline;
}