/* =========================================
   1. 規則說明區 (Rule Box)
   ========================================= */
.rule-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.rule-box h3 {
    margin-top: 0;
    color: var(--primary-gold, #fbb750);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* 顏色工具 */
.text-green { color: #81c784; }
.text-red { color: #ff5252; }
.text-blue { color: #64b5f6; }
.text-gold { color: #ffd700; }
.highlight { color: #ffd700; font-weight: bold; }
.mt-20 { margin-top: 20px; }
.intro-text { color: #ccc; margin-bottom: 15px; }

/* 連結按鈕 */
.action-area {
    text-align: center;
}

.link-btn.large {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.link-btn.large:hover {
    background: var(--primary-gold, #fbb750);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(251, 183, 80, 0.4);
}

/* =========================================
   2. 畫廊網格 (Mosaic Gallery)
   ========================================= */
.mosaic-gallery {
    display: grid;
    /* 電腦版：自動填滿，每張圖最小寬度 250px */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--primary-gold, #fbb750);
    z-index: 10;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    display: block;
}

/* =========================================
   3. RWD 手機版優化
   ========================================= */
@media (max-width: 768px) {

    /* 畫廊在手機上設定為雙欄，節省空間 */
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }
    
    .gallery-item {
        padding: 5px;
    }
}