/* 其他：统一尺寸网格画廊 */
#gallery-other-app.gallery-other-container {
    background: transparent;
    min-height: 100vh;
    padding: 2rem;
}

#gallery-other-app .search-sort-bar {
    display: flex !important;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 1rem;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

#gallery-other-app .search-box {
    flex: 2;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    min-width: 200px;
}

#gallery-other-app .sort-select {
    padding: 0.8rem;
    border-radius: 30px;
    border: 1px solid #ddd;
    background: white;
}

/* ===== 统一网格 ===== */
#gallery-other-app .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}

@media (max-width: 1023px) {
    #gallery-other-app .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    #gallery-other-app .gallery-grid { grid-template-columns: 1fr; }
}

/* ===== 固定比例的卡片 ===== */
#gallery-other-app .other-card {
    position: relative;
    width: 100%;
    padding-bottom: 75%;  /* 4:3 比例 → 宽高比一致 */
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#gallery-other-app .other-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

#gallery-other-app .other-card img,
#gallery-other-app .other-card video,
#gallery-other-app .other-card .video-poster {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* ===== 视频播放按钮覆盖 ===== */
#gallery-other-app .other-card .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

#gallery-other-app .other-card .play-overlay::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

/* ===== 标题浮层 ===== */
#gallery-other-app .other-card .other-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: white;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
}

#gallery-other-app .other-card:hover .other-info {
    opacity: 1;
}

#gallery-other-app .other-card .image-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gallery-other-app .other-card .image-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#gallery-other-app .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.2rem;
}

#gallery-other-app .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px; height: 48px;
    font-size: 24px;
    cursor: pointer;
    display: none;
    z-index: 998;
}

/* ===== 齿轮面板（相同尺寸限制） ===== */
#gallery-other-app .gear-panel {
    max-width: 360px;
}
