/* 控制整個 figure 容器 */
figure {
    max-width: 500px;
    margin: 20px auto; /* 居中，上下留白 */
    padding: 10px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color); /* 加條淡淡嘅條邊 */
    text-align: center; /* 圖片同文字居中 */
    border-radius: 8px; 
    box-shadow: var(--shadow-md); 
}

/* 控制圖片下面嘅說明文字 (Caption) */
figcaption {
    font-size: 0.8em;
    color: var(--text-primary);
    margin-top: 8px;
}



/* 確保 figure 入面張圖唔會爆出嚟 */
figure img {
    max-width: 100%;     /* 取代 width: 100%，確保打橫大圖最多只會去到容器咁闊 */
    width: auto;         /* 容許圖片根據高度自動計算闊度 */
    height: auto;        /* 容許圖片根據闊度自動計算高度 */
    /*max-height: 300px;*/   /* 限制打直圖片嘅最高高度 */
    border: 1px solid var(--border-color); /* 加條淡淡嘅條邊 */
    border-radius: 8px; 
    box-shadow: var(--shadow-md); 
}

/* Video 影片樣式 */
figure video {
    display: block; 
    border: 1px solid var(--border-color); /* 加條淡淡嘅條邊 */
    border-radius: 8px; 
    box-shadow: var(--shadow-md); 
}