/* Kit/news_list.css */

/* 頁面容器 */
.news-list-container {
    background: rgba(20, 20, 20, 0.9); /* 深色半透明底 */
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 600px;
    position: relative;
}

/* 標題樣式 */
.page-title {
    text-align: center;
    margin-bottom: 30px;
}

.page-title h2 {
    color: var(--primary-gold, #fbb750);
    font-size: 2rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(251, 183, 80, 0.3);
}

.title-line {
    width: 60px;
    height: 3px;
    background: var(--accent-red, #d7423c);
    margin: 0 auto;
}

/* 列表樣式 */
.news-full-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-full-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.news-full-list li:last-child {
    border-bottom: none;
}

.news-full-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    text-decoration: none;
    color: #e0e0e0;
}

.news-full-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.news-full-list li:hover a {
    color: #fff;
}

/* 標題與標籤 */
.news-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1; /* 佔滿剩餘空間 */
    overflow: hidden;
}

.news-title {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 太長自動變... */
}

/* 日期 */
.news-date {
    color: #888;
    font-size: 0.9rem;
    font-family: monospace;
    margin-left: 20px;
    min-width: 90px;
    text-align: right;
}

/* 標籤 (沿用首頁的 Tag 樣式) */
.tag {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff;
    white-space: nowrap;
}
.tag.hot { background: #d7423c; }
.tag.event { background: #1e88e5; }
.tag.sys { background: #43a047; }


/* --- 分頁按鈕樣式 (Pagination) --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.page-btn:hover:not(.disabled) {
    background: var(--primary-gold, #fbb750);
    color: #000;
    border-color: var(--primary-gold, #fbb750);
}

/* 當前頁面 */
.page-btn.active {
    background: var(--accent-red, #d7423c);
    color: #fff;
    border-color: var(--accent-red, #d7423c);
    cursor: default;
}

/* 禁止點擊 (如第一頁時的 上一頁按鈕) */
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #222;
}

.page-dots {
    color: #666;
}

/* 手機版 RWD */
@media (max-width: 768px) {
    .news-list-container {
        padding: 20px;
    }
    
    .news-full-list a {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 5px;
    }
    
    .news-info {
        width: 100%;
        margin-bottom: 5px;
    }

    .news-title {
        white-space: normal; /* 手機版標題可換行 */
    }

    .news-date {
        margin-left: 0;
        font-size: 0.85rem;
        width: 100%;
        text-align: left;
        color: #666;
    }
}

/* Kit/news_list.css */

/* 1. 修改容器設定 */
.news-list-container {
    background: rgba(20, 20, 20, 0.9);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 600px;
    
    /* ★ 關鍵：設為相對定位，並隱藏超出的部分 */
    position: relative; 
    overflow: hidden; 
    z-index: 1; /* 建立堆疊環境 */
}

/* 2. 確保原本的內容 (文字、列表、分頁) 在圖片上面 */
.page-title,
.pagination,
.news-full-list {
    position: relative;
    z-index: 10; /* 讓文字浮在 NPC 上面 */
}

/* 3. ★ NPC 裝飾圖樣式 ★ */
.npc-decoration {
    position: absolute;
    bottom: -20px; /* 稍微往下沉一點，更有從底部浮現的感覺 */
    right: -20px;  /* 靠右，稍微超出邊界也沒關係(因為有 overflow:hidden) */
    z-index: 1;    /* 在背景之上，但在文字之下 */
    pointer-events: none; /* ★ 重要：讓滑鼠可以直接穿透圖片點擊到底下的連結 */
}

.npc-decoration img {
    height: 500px; /* 設定高度，讓它自動等比縮放 */
    width: auto;
    opacity: 0.3;  /* ★ 透明度：0.2~0.4 之間最適合，太清楚會干擾閱讀 */
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.8)); /* 加一點陰影更有層次 */
    
    /* 選擇性特效：黑白或保留彩色 */
    /* filter: grayscale(100%) opacity(0.2); (如果想要純黑白底圖) */
}

/* 4. 手機版調整 */
@media (max-width: 768px) {
    .npc-decoration img {
        height: 300px; /* 手機版縮小一點 */
        opacity: 0.15; /* 手機版淡一點，避免干擾閱讀 */
        right: -50px;  /* 往右推一點 */
    }
}

/* =========================================
   彈跳視窗樣式 (News Modal)
   ========================================= */
.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 深色背景遮罩 */
    backdrop-filter: blur(5px);      /* 背景模糊特效 */
    z-index: 10000;
    
    /* Flex 置中 */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 預設隱藏 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 顯示狀態 (JS 會加上 active class) */
.news-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 彈窗本體 */
.news-modal-box {
    background: #1a1510; /* 深褐黑底 */
    width: 95%;
    max-width: 1200px;   /* 寬度設定 */
    max-height: 90vh;    /* 高度設定 */
    
    border: 1px solid #fbb750; /* 金色邊框 */
    box-shadow: 0 0 20px rgba(251, 183, 80, 0.2);
    border-radius: 8px;
    padding: 25px;
    
    position: relative;
    display: flex;
    flex-direction: column;
    
    /* 進場動畫 */
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.news-modal-overlay.active .news-modal-box {
    transform: translateY(0);
}

/* 關閉按鈕 (X) */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover {
    color: #d7423c; /* 紅色 */
}

/* 彈窗標題區 */
.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.modal-header h3 {
    color: #fbb750;
    font-size: 1.5rem;
    margin: 0 0 5px 0;
}

.modal-date {
    color: #888;
    font-size: 0.9rem;
    font-family: monospace;
}

/* 彈窗內容區 (可捲動) */
.modal-body {
    flex-grow: 1;
    overflow-y: auto; /* 內容太長時出現卷軸 */
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.8;
}

/* 內容區圖片自適應 */
.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* 針對卷軸的美化 (Chrome/Safari) */
.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-track {
    background: #111; 
}
.modal-body::-webkit-scrollbar-thumb {
    background: #444; 
    border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #fbb750; 
}

/* 複製連結按鈕 */
.copy-btn {
    background: transparent;
    border: 1px solid #666;
    color: #888;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 10px;
}

.copy-btn:hover {
    border-color: #fbb750;
    color: #fbb750;
    background: rgba(251, 183, 80, 0.1);
}

.copy-btn i {
    margin-right: 5px;
}

