:root {
    --primary-green: #4CAF50;
    --primary-purple: #9C27B0;
    --glass-bg: rgba(15, 15, 15, 0.96);
    --border-color: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

/* 基礎設定：恢復正常滾動邏輯，解決縮放問題 */
html, body {
    margin: 0; padding: 0;
    width: 100%; min-height: 100%;
    background-color: #000;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: 'Microsoft JhengHei', 'Segoe UI', sans-serif;
    color: white;
    line-height: 1.6;
}

/* 背景固定 */
.bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../bg.jpg');
    background-size: cover; background-position: center;
    z-index: -2;
}

/* --- 核心 Grid 佈局 (解決比例變形) --- */
.main-wrapper {
    display: grid;
    /* 電腦版：固定 320px 側欄，中間自動分配 */
    grid-template-columns: 320px 1fr 320px;
    gap: 25px;
    width: 96%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 0 100px 0;
}

/* RWD：當螢幕小於 1300px 時改為單欄垂直排列 */
@media (max-width: 1300px) {
    .main-wrapper {
        display: flex;
        flex-direction: column;
        padding: 20px 15px;
    }
}

.sidebar, .center-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 25px;
    height: fit-content; /* 根據內容決定高度 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 防止圖片撐破佈局 */
img { max-width: 100%; height: auto; border-radius: 8px; }

/* --- 中間區塊與按鈕優化 --- */
.header-box { text-align: center; margin-bottom: 40px; }
.server-logo { width: 110px; height: 110px; border-radius: 50%; border: 3px solid #f0e68c; background: #222; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 10px 0; }

.hero-card { 
    width: 100%; background: rgba(255,255,255,0.03); border-radius: 24px; 
    overflow: hidden; margin-bottom: 60px; border: 1px solid var(--border-color);
}
.hero-banner { height: 100px; background: linear-gradient(135deg, #1b5e20, #4CAF50); }
.hero-content { padding: 30px 20px; text-align: center; }

/* 核心 Survival 按鈕組：自動換行與垂直適應 */
.btn-group { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; /* 空間不夠時自動換行 */
    justify-content: center; 
    margin-top: 25px;
}
.btn { 
    flex: 1; 
    min-width: 150px; /* 保證按鈕不會縮得太小 */
    padding: 16px 10px; border-radius: 12px;
    text-decoration: none; color: white; font-weight: bold; font-size: 1rem;
    text-align: center; background: rgba(255,255,255,0.1); transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}
.btn-green { background: #2e7d32; }
.btn-blue { background: #1565c0; }
.btn-orange { background: #e65100; }
.btn:hover { transform: translateY(-3px); filter: brightness(1.2); }

/* 下方模組區間隔 */
.mod-header-push {
    text-align: center; color: #888; margin: 80px 0 30px 0; letter-spacing: 3px;
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px;
}
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; width: 100%; }

/* --- 指令與規定樣式更新 --- */
.side-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 12px; color: #f0e68c; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; margin-top: 30px; }
.cmd-label { color: #81C784; font-weight: bold; margin-top: 15px; font-size: 0.95rem; }
.cmd-list li, .rule-list li { padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); font-size: 0.95rem; list-style: none; color: #ddd; text-align: left; }
.cmd-code { color: #f0e68c; font-family: monospace; background: rgba(255,255,0,0.05); padding: 2px 5px; border-radius: 4px; font-weight: bold; }
.highlight { color: #FFA726; font-weight: bold; }
.highlight-danger { color: #ef5350; font-weight: bold; }

.staff-badge { display: flex; align-items: center; gap: 15px; padding: 15px; background: rgba(255,255,255,0.05); border-radius: 15px; margin-top: 20px; }
.staff-badge img { width: 45px; height: 45px; border-radius: 8px; }

.discord-btn { background: #5865F2; color: white; text-decoration: none; padding: 15px; border-radius: 12px; font-weight: bold; text-align: center; display: block; margin-bottom: 10px; }
.discord-btn.mod { background: #4e5d94; }

.footer { text-align: center; color: #444; padding: 60px 0; font-size: 0.85rem; width: 100%; }


/* style.css 新增樣式 */

.gallery-item {
    margin-bottom: 30px; /* 每一組照片之間的距離 */
    background: rgba(255, 255, 255, 0.05); /* 卡片背景色 */
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    /* 移除舊有的 active class 相關設定，因為不再需要輪播 */
}

.gallery-caption {
    margin-top: 10px;
    text-align: center;
    color: #f0e68c; /* 淡黃色文字，比較顯眼 */
    font-size: 0.95rem;
    font-weight: bold;
}