.treasures-grid {
    padding: 60px 10% 120px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.treasure-card {
    position: relative;
    height: 320px; /* Reduced height for more horizontal look */
    overflow: hidden;
    background: #000;
    border-radius: 8px; /* Added slight rounding for better look */
}

.treasure-card img, .treasure-card video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This forces crop to fit horizontal frame */
    transition: var(--transition-smooth);
    opacity: 0.8;
}

/* 优化文字显示 */
.treasure-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    transition: var(--transition-smooth);
    z-index: 2;
}

.treasure-card:hover img {
    transform: scale(1.05);
    opacity: 0.7;
}

.treasure-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    color: #ffffff;
}

.treasure-info p {
    font-size: 0.95rem;
    opacity: 1;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    color: #eeeeee;
}

.treasure-info .location {
    font-family: 'Ma Shan Zheng', cursive;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* 确保分类栏始终可见，防止动画冲突 */
.filter-bar {
    opacity: 1 !important;
    transform: none !important;
}

.filter-bar {
    padding: 120px 10% 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 1px solid var(--primary-red);
    background: transparent;
    color: var(--primary-red);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-red);
    color: white;
}

.treasure-card.hidden {
    display: none;
}

/* 媒体图标叠加 */
.media-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(155, 27, 30, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    z-index: 3;
    pointer-events: none;
    border: 2px solid rgba(255,255,255,0.3);
    transition: var(--transition-smooth);
}

.treasure-card:hover .media-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary-red);
}

/* Modal 样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.modal.active {
    display: flex;
}

.modal-container {
    max-width: 1000px;
    width: 100%;
    background: white;
    position: relative;
    padding: 40px;
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.modal-body img, .modal-body video {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-body audio {
    width: 100%;
    margin-top: 20px;
}

.modal-body .text-content {
    padding: 20px;
    line-height: 2;
    font-size: 1.1rem;
    color: var(--text-black);
}

