/* css/style.css */

:root {
    --peach-primary: #FFB7B2;
    --peach-dark: #FF8B94;
    --peach-border: #FFD5D5;
    --bg-light: #F6F3F8;
    --text-main: #444;
    --accent-purple: #7E6FFF;
    /* 標題與分隔線漸層 */
    --title-line-gradient: linear-gradient(90deg, rgba(161, 140, 209, 0) 0%, rgba(161, 140, 209, 0.8) 35%, rgba(251, 194, 235, 0.8) 65%, rgba(251, 194, 235, 0) 100%);
    --title-fade: linear-gradient(90deg, rgba(161, 140, 209, 0) 0%, rgba(161, 140, 209, 0.3) 30%, rgba(251, 194, 235, 0.3) 70%, rgba(251, 194, 235, 0) 100%);
}

body {
    margin: 0; padding: 0; overflow-x: hidden;
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    background-color: var(--bg-light); color: var(--text-main);
    scroll-behavior: smooth;
}

/* 鎖定背景捲動 */
body.modal-open {
    overflow: hidden;
}

.main-wrapper { width: 100%; display: flex; flex-direction: column; }

/* --- 1. 導覽列 --- */
header {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px);
    padding: 0 50px; height: 80px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 4px 30px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 10000;
    border-bottom: 3px solid rgba(255, 213, 213, 0.3);
}
.logo img { height: 70px; width: auto; object-fit: contain; }
nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 30px; }
.menu-item { list-style: none; }
.menu-item > a { text-decoration: none; color: #333; font-weight: 1000; font-size: 18px; transition: 0.3s; padding: 10px 15px; }
.menu-item > a:hover { color: var(--peach-dark); }
.menu-toggle { display: none; font-size: 32px; cursor: pointer; color: var(--peach-dark); z-index: 10001; }

/* --- 2. Hero 區 --- */
.hero {
    height: 480px; background: url('../images/TopP.png'); background-size: cover; background-position: center;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative;
}
.hero-text-container { display: flex; flex-direction: column; align-items: center; transform: translateY(110px); width: 100%; }
.hero-title-box { width: 100%; display: flex; justify-content: center; align-items: center; margin-bottom: 20px; }
.hero-title-img { max-width: 450px; height: auto; filter: drop-shadow(0 8px 20px rgba(255, 139, 148, 0.4)); animation: titleFloat 4s infinite ease-in-out; }
@keyframes titleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.btn-sub { padding: 16px 60px; border-radius: 50px; text-decoration: none; font-weight: 900; font-size: 20px; background: linear-gradient(90deg, #A18CD1, #FBC2EB); color: white; transition: 0.4s; box-shadow: 0 10px 25px rgba(161, 140, 209, 0.4); }

/* --- 3. 狀態欄 --- */
.stats-bar { background: white; width: fit-content; margin: -35px auto 40px; padding: 15px 65px; border-radius: 100px; display: flex; gap: 50px; box-shadow: 0 20px 45px rgba(0,0,0,0.1); border: 4px solid var(--peach-border); position: relative; z-index: 100; }
.stat-item { font-size: 22px; font-weight: 900; color: var(--peach-dark); white-space: nowrap; }

/* --- 4. 標題與光暈設計 --- */
.wide-title-box { text-align: center; margin: 100px 0 60px; position: relative; width: 100%; }
.wide-title-glow { position: absolute; top: 50%; left: 0; width: 100%; height: 90px; background: var(--title-fade); transform: translateY(-50%); filter: blur(30px); z-index: 1; }
.wide-title-box::after { content: ""; position: absolute; bottom: -15px; left: 0; width: 100%; height: 2px; background: var(--title-line-gradient); z-index: 2; }
.wide-title-box h2 { position: relative; z-index: 3; font-size: 38px; font-weight: 900; color: var(--peach-dark); letter-spacing: 6px; margin: 0; text-shadow: 2px 2px 10px #fff; }

.news-section-wrap { width: 92%; max-width: 1250px; margin: 0 auto 100px; }
.news-flex-container { display: flex; gap: 40px; align-items: stretch; }
.news-list-side { flex: 7; display: flex; flex-direction: column; }
.news-item { display: flex; align-items: center; padding: 14px 25px; background: rgba(255, 255, 255, 0.8); border-radius: 15px; border: 1px solid #fff; transition: 0.3s; margin-bottom: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); cursor: pointer; }
.news-item:hover { background: white; transform: translateX(15px); border-color: var(--peach-primary); }
.news-date { color: var(--peach-primary); width: 110px; font-weight: 900; flex-shrink: 0; }
.news-title-text { flex-grow: 1; font-weight: 800; font-size: 17px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: auto; padding-top: 20px; }
.page-btn { padding: 10px 20px; border-radius: 12px; background: white; border: 2px solid var(--peach-primary); color: var(--peach-dark); font-weight: 900; cursor: pointer; }
.page-btn.active { background: var(--peach-primary); color: white; }

.news-sidebar-side { flex: 3; display: flex; flex-direction: column; gap: 20px; }
.side-card { flex: 1; background: white; border-radius: 25px; padding: 25px; border: 4px solid var(--peach-border); text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.03); }
.side-card h3 { color: var(--peach-dark); font-size: 20px; margin-bottom: 12px; font-weight: 900; }
.discord-btn { display: inline-block; padding: 10px 35px; background: #5865F2; color: white; border-radius: 50px; font-weight: 900; text-decoration: none; transition: 0.3s; }

/* --- 5. 核心特色 --- */
.features-section-wrap { width: 95%; max-width: 1400px; margin: 0 auto 120px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.card { 
    background: white; border-radius: 40px; border: 6px solid var(--peach-border); 
    transition: 0.4s; overflow: hidden; cursor: pointer; position: relative;
    box-shadow: 0 10px 40px rgba(255, 183, 178, 0.2);
}
.card:hover { transform: translateY(-10px); }
.card-img-box { width: 100%; height: 180px; overflow: hidden; border-bottom: 2px solid var(--peach-border); }
.card-img-box img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 25px; text-align: center; }
.card h3 { color: var(--peach-dark); font-size: 22px; font-weight: 900; margin-bottom: 10px; }

/* --- 彈跳窗樣式 --- */
.modal-overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(255, 235, 235, 0.4); 
    z-index: 20000; justify-content: center; align-items: center; backdrop-filter: blur(10px); 
}
.modal-content { 
    background: #fff; width: 90%; max-width: 850px; 
    max-height: 90vh; border: 6px solid var(--peach-border); border-radius: 0px; 
    position: relative; overflow: hidden; 
    box-shadow: 0 40px 120px rgba(255, 183, 178, 0.3);
    display: flex; flex-direction: column; animation: modalSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.modal-scroll-box { overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--peach-primary) #FFF4F6; }
.modal-scroll-box::-webkit-scrollbar { width: 8px; }
.modal-scroll-box::-webkit-scrollbar-track { background: #FFF4F6; }
.modal-scroll-box::-webkit-scrollbar-thumb { background: var(--peach-border); border-radius: 10px; }

@keyframes modalSlideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

.modal-img-container {
    width: 100%; background: #FFF4F6; 
    display: flex; justify-content: center; align-items: center;
    padding: 55px 0; border-bottom: 1px solid #FFEDF0;
    position: relative; overflow: hidden;
}
.mist-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 75%, rgba(255, 244, 246, 0.8) 100%);
    pointer-events: none; z-index: 2;
}
.modal-main-img { 
    width: 480px; height: 340px; object-fit: cover; display: block; position: relative; z-index: 1;
    mask-image: radial-gradient(circle at center, black 70%, rgba(0,0,0,0.4) 90%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 70%, rgba(0,0,0,0.4) 90%, transparent 100%);
}
.modal-body { padding: 60px 50px; text-align: center; background: #fff; }
.modal-title-text { font-size: 38px; font-weight: 900; color: var(--peach-dark); letter-spacing: 5px; margin: 0; margin-bottom: 25px; }
.modal-hr { width: 100%; height: 1px; background: #F5F5F5; border: none; margin: 40px 0; }
.modal-detail-text { font-size: 20px; font-weight: 500; color: #666; line-height: 2.4; text-align: center; max-width: 750px; margin: 0 auto; }

/* 表格樣式 */
.feature-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    margin: 20px 0; border-radius: 15px; overflow: hidden;
    border: 1px solid var(--peach-border);
}
.feature-table th { background-color: #FFF0F2; color: var(--peach-dark); padding: 15px; font-weight: 900; font-size: 18px; border-bottom: 1px solid var(--peach-border); }
.feature-table td { padding: 12px 15px; background-color: #fff; color: #666; font-size: 16px; border-bottom: 1px solid #FDF0F1; font-weight: 500; }
.feature-table tr:nth-child(even) td { background-color: #FFFBFC; }
.feature-table td:nth-child(3) { color: var(--peach-dark); font-weight: 700; }

.close-btn { position: absolute; top: 20px; right: 30px; font-size: 45px; color: var(--peach-primary); cursor: pointer; z-index: 20005; transition: 0.3s; }

footer { background: #111; color: rgba(255,255,255,0.4); text-align: center; padding: 40px 20px; border-top: 5px solid var(--peach-primary); }

/* RWD */
@media (max-width: 768px) {
    header { padding: 0 20px; }
    nav { display: none; }
    nav.active { display: flex; flex-direction: column; position: absolute; top: 80px; left: 0; width: 100%; background: #fff; padding: 20px 0; border-bottom: 2px solid var(--peach-border); }
    .menu-toggle { display: block; }
    .grid { grid-template-columns: 1fr; }
    .modal-content { width: 95%; max-height: 95vh; }
    .modal-main-img { width: 90%; height: auto; }
}

/* 公告分類按鈕列 */
.news-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid var(--peach-border);
    background: white;
    color: var(--peach-dark);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    background: #FFF0F2;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--peach-primary);
    border-color: var(--peach-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 183, 178, 0.4);
}

/* 公告清單內的類型標籤 */
.news-tag {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 6px;
    margin-right: 15px;
    font-weight: 900;
    flex-shrink: 0;
}

.tag-update { background: #E1F5FE; color: #0288D1; } /* 藍色 */
.tag-event { background: #F3E5F5; color: #8E24AA; }  /* 紫色 */
.tag-major { background: #FFEBEE; color: #E53935; }  /* 紅色 */
/* --- 💎 公告分類篩選按鈕列 (頂部) --- */
.news-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding-left: 5px;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 50px; /* 圓角膠囊型 */
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #666;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 按鈕點擊後的活性狀態 */
.filter-btn.active {
    background: var(--peach-dark);
    border-color: var(--peach-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 139, 148, 0.4);
}

/* --- 💎 公告清單內的類型標籤 (類似圖2設計) --- */
.news-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px; /* 統一標籤寬度更整齊 */
    height: 28px;
    font-size: 13px;
    padding: 0 12px;
    border-radius: 50px; /* 圓角膠囊型 */
    margin-right: 15px;
    font-weight: 900;
    color: #fff; /* 白色字 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* 微陰影增加質感 */
    flex-shrink: 0;
}

/* 分類顏色定義 - 參考圖2的飽和色系 */
.tag-update { background: #1976D2; } /* 更新公告：深藍色 */
.tag-event  { background: #9C27B0; } /* 活動公告：紫色 */
.tag-major  { background: #C62828; } /* 重大公告：深紅色 */
.tag-all    { background: #757575; } /* 一般/全部：灰色 */

/* 標題文字微調，讓它對齊標籤 */
.news-title-text {
    font-size: 16px;
    font-weight: 800;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 手機版按鈕微調 */
@media (max-width: 768px) {
    .news-filter-bar { gap: 8px; justify-content: center; }
    .filter-btn { padding: 8px 16px; font-size: 14px; }
}