/* =============================================================== */
/* Dashboard 頁面的所有樣式 */
/* =============================================================== */


/* --- 全域與基本設定 --- */

body {
    font-family: sans-serif; /* 設定頁面預設為無襯線字體 */
    background: #f0f2f5; /* 設定頁面背景顏色為淺灰色 */
    padding: 20px; /* 設定頁面內容與視窗邊緣的間距為 20px */
}


/* --- 頁首 (Header) --- */

/* 整個頁首容器 */
.top-header {
    display: flex; /* 設定為 Flexbox 彈性佈局 */
    align-items: center; /* 垂直置中對齊子元素 */
    background-color: #6c757d; /* 設定背景顏色 */
    padding: 10px 20px; /* 設定內邊距 (上下10px, 左右20px) */
    border-radius: 8px; /* 設定圓角半徑 */
    margin-bottom: 20px; /* 設定與下方元素的間距 */
    position: relative; /* 設定為相對定位 (用於 z-index 的基準) */
    z-index: 20; /* 設定堆疊順序，確保在頁面其他元素之上 */
}

/* 頁首左側區塊 (漢堡選單 + Logo) */
.header-left {
    display: flex; /* 設定為 Flexbox 佈局 */
    align-items: center; /* 垂直置中對齊子元素 */
    gap: 16px; /* 設定子元素之間的間距 */
}

/* 左上角漢堡選單按鈕 */
.fab-menu-btn {
    background: #868e96; /* 設定背景顏色 */
    color: #fff; /* 設定文字(圖示)顏色 */
    width: 42px; /* 設定寬度 */
    height: 42px; /* 設定高度 */
    border-radius: 50%; /* 設定圓角半徑為 50%，使其變為圓形 */
    border: none; /* 移除邊框 */
    outline: none; /* 移除點擊時的藍色外框 */
    box-shadow: 0 2px 6px #868e9644; /* 設定按鈕陰影 (X偏移, Y偏移, 模糊半徑, 顏色) */
    display: flex; /* 設定為 Flexbox 佈局 */
    align-items: center; /* 垂直置中子元素 */
    justify-content: center; /* 水平置中子元素 */
    font-size: 1.55em; /* 設定圖示大小 */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    transition: background 0.16s, box-shadow 0.19s; /* 設定背景和陰影的過渡動畫效果與時間 */
}

.fab-menu-btn:hover {
    background: #495057; /* 設定滑鼠移上時的背景顏色 */
}

/* 網站 Logo 文字 */
.logo {
    font-family: "Fascinate Inline", system-ui; /* 設定特殊字體，若無則使用系統預設 */
    color: white; /* 設定文字顏色 */
    font-weight: bold; /* 設定字體為粗體 */
    font-size: 1.5em; /* 設定字體大小 */
    text-shadow: 2.5px 1px 2px rgba(0, 0, 0, 20); /* 設定文字陰影 */
    margin-left: 2px; /* 設定左外邊距 */
}

/* 搜尋欄容器 */
.search-container {
    display: flex; /* 設定為 Flexbox 佈局 */
    flex-grow: 0.5; /* 佔用 0.5 份的彈性空間 */
    background-color: #e9ecef; /* 設定背景顏色 */
    border-radius: 15px; /* 設定圓角，使其變為膠囊形狀 */
    padding: 5px 10px; /* 設定內邊距 */
    margin-left: 28px; /* 設定左外邊距 */
}

/* 搜尋輸入框 */
.search-container input[type="search"] {
    flex-grow: 1; /* 佔滿剩餘的彈性空間 */
    border: none; /* 移除邊框 */
    background: transparent; /* 設定透明背景 */
    outline: none; /* 移除點擊時的外框 */
    padding: 5px; /* 設定內邊距 */
    border-radius: 15px; /* 設定圓角 */
}

/* 搜尋圖示 */
.search-container .search-icon {
    background: none; /* 無背景 */
    border: none; /* 無邊框 */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    padding: 0 5px; /* 設定內邊距 (上下0, 左右5px) */
    color: #6c757d; /* 設定圖示顏色 */
}

/* 右側使用者導覽區 (登入/註冊) */
.user-nav {
    display: flex; /* 設定為 Flexbox 佈局 */
    align-items: center; /* 垂直置中子元素 */
    margin-left: auto; /* 將此區塊推到最右邊 */
}

/* 右側導覽區的按鈕 */
.user-nav .btn {
    background-color: #adb5bd; /* 設定背景顏色 */
    color: white; /* 設定文字顏色 */
    border: none; /* 無邊框 */
    padding: 8px 15px; /* 設定內邊距 */
    border-radius: 5px; /* 設定圓角 */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    margin-left: 10px; /* 設定左外邊距 */
    font-size: 0.9em; /* 設定字體大小 */
    white-space: nowrap; /* 強制文字不換行 */
}

.user-nav .btn:hover {
    background-color: #868e96; /* 設定滑鼠移上時的背景顏色 */
}


/* --- 側邊滑出選單 (Sidebar) --- */

/* 側邊欄彈出時的半透明背景遮罩 */
.slide-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.13);
    z-index: 1300;
}

/* 側邊欄主體 */
.slide-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: #fff;
    box-shadow: 10px 0 32px #b4b4b41a;
    border-top-right-radius: 28px;
    border-bottom-right-radius: 28px;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    transform: translateX(-120%);
    z-index: 1301;
    transition: transform 0.35s cubic-bezier(.48, .14, .41, 1.1);
    border: 1.5px solid #f0f2f5;
}

.slide-sidebar.open {
    transform: translateX(0);
}

/* 側邊欄內的個人資料區 */
.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    margin-left: 29px;
    margin-bottom: 16px;
    padding-top: 22px;
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e0e5;
    box-shadow: 0 2px 8px #adb5bd26;
    margin-bottom: 3px;
}

.sidebar-nickname {
    font-weight: bold;
    color: #495057;
    font-size: 1.08em;
    margin-bottom: 0.5px;
    line-height: 1.22;
}

.sidebar-email {
    font-size: 0.93em;
    color: #bfc4cc;
    margin-left: 0;
    line-height: 1.13;
    font-weight: 400;
    letter-spacing: 0.1px;
    padding-left: 0;
    margin-top: -2px;
}

/* 側邊欄按鈕區 */
.sidebar-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px; /* 恢復原始間距 */
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto; /* 【關鍵】當內容超出時，顯示垂直滾動條 */
    flex-grow: 1; /* 讓此區塊填滿剩餘的垂直空間 */
    padding-bottom: 50px;
    padding-top: 10px;
    padding-left: 20px;
}

/*  側邊欄按鈕 */
.sidebar-action-btn {
    background: #f7f7f8;
    color: #495057;
    border: none;
    border-radius: 50px; /* 【關鍵】恢復膠囊狀圓角 */
    width: 60%; /* 【關鍵】寬度由內容決定，不再是100% */
    min-width: 105px;
    min-height: 40px;
    box-shadow: 0 2px 10px #868e9610;
    font-weight: bold; /* 【關鍵】恢復原始字體粗細 */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 【關鍵】文字靠左對齊 */
    cursor: pointer;
    transition: background 0.13s, color 0.13s, transform 0.18s;
    outline: none;
    text-decoration: none;
    text-align: center;


    /* 1. 統一字體大小與行高 */
    font-size: 1.0em; /* 將字體大小稍微調整為一致的 1.0em */
    line-height: 1;   /* 設定固定的行高，避免高度不一 */

    /* 2. 統一 padding 與 box-sizing 計算模型 */
    padding: 10px 18px; /* 稍微調整 padding 讓視覺高度更一致 */
    box-sizing: border-box; /* 核心修正：強制所有元素的寬高計算都包含 padding */
}

.sidebar-action-btn:hover {
    background: #868e96;
    color: #fff;
    transform: scale(1.08) translateX(3px); /* 恢復原始 hover 效果 */

}


/* --- 彈出視窗 (Modal) 通用樣式 --- */

.modal {
    display: none; /* 預設隱藏 */
    position: fixed; /* 固定在視窗上 */
    z-index: 1500; /* 設定堆疊順序 */
    left: 0; /* 距離左側 0 */
    top: 0; /* 距離頂部 0 */
    width: 100vw; /* 100% 視窗寬度 */
    height: 100vh; /* 100% 視窗高度 */
    background: rgba(0, 0, 0, 0.4); /* 半透明黑色背景遮罩 */
    justify-content: center; /* Flexbox 水平置中 */
    align-items: center; /* Flexbox 垂直置中 */
}


/* --- 彈出視窗：發文/編輯 --- */

.styled-modal.custom-post-modal {
    background: #f0f2f5; /* 設定背景顏色 */
    border-radius: 22px; /* 設定圓角 */
    box-shadow: 0 8px 32px rgba(80, 80, 80, 0.15), 0 1.5px 6px rgba(110, 110, 110, 0.12); /* 設定多重陰影 */
    border: none; /* 無邊框 */
    max-width: 800px; /* 設定最大寬度 */
    min-height: 520px; /* 設定最小高度 */
    width: 90vw; /* 寬度為 90% 視窗寬度 */
    display: flex; /* 設定為 Flexbox 佈局 */
    flex-direction: column; /* 設定子元素垂直排列 */
}

.custom-modal-body {
    display: flex;
    gap: 26px;
    padding: 32px 40px 20px 40px;
    background: none;
    align-items: stretch;
}

.custom-modal-left {
    flex: 0 0 55%; /* Flex 屬性 (增長, 縮小, 基礎寬度) 為 55% */
    display: flex; /* 設定為 Flexbox 佈局 */
    flex-direction: column; /* 設定子元素垂直排列 */
    gap: 12px; /* 設定子元素間距 */
    background: none; /* 無背景 */
    justify-content: flex-start; /* 子元素從頂部開始排列 */
}

.custom-user-info {
    display: flex; /* 設定為 Flexbox 佈局 */
    align-items: center; /* 垂直置中子元素 */
    margin-bottom: 6px; /* 設定下外邊距 */
}

.avatar-modal {
    width: 52px; /* 設定寬度 */
    height: 52px; /* 設定高度 */
    border-radius: 50%; /* 設定圓角為圓形 */
    background: #fff; /* 設定背景顏色 */
    margin-right: 10px; /* 設定右外邊距 */
    object-fit: cover; /* 確保圖片填滿且不變形 */
    box-shadow: 0 2px 8px #c2a3fc29; /* 設定陰影 */
}

.username-modal {
    font-weight: 800; /* 設定字體粗細 */
    font-size: 1.4em; /* 設定字體大小 */
    letter-spacing: 0.5px; /* 設定字元間距 */
}

.custom-input,
.custom-textarea,
.custom-image-placeholder {
    background: #f2f2f2; /* 設定背景顏色 */
    border: none; /* 無邊框 */
    border-radius: 14px; /* 設定圓角 */
    font-size: 1.05em; /* 設定字體大小 */
    box-shadow: inset 0 4px 22px rgba(0, 0, 0, 0.10), inset 0 1.5px 7px rgba(120, 120, 120, 0.12); /* 設定內陰影效果 */
    padding: 13px 17px; /* 設定內邊距 */
}

.custom-input {
    height: 2.5em; /* 設定高度 */
    margin-bottom: 4px; /* 設定下外邊距 */
}

.custom-textarea {
    min-height: 170px; /* 設定最小高度 */
    resize: none; /* 禁止使用者手動調整大小 */
    font-family: inherit; /* 繼承父層的字體設定 */
}

.custom-modal-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    background: none;
    padding-top: 64px;
}

.image-upload-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.custom-image-placeholder {
    width: 100%;
    flex-grow: 1;
    aspect-ratio: auto;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 7px 24px rgba(0, 0, 0, 0.13), inset 0 1.5px 8px rgba(110, 110, 110, 0.10);
    background: #f2f2f2;
    border-radius: 14px;
}

.image-placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.86;
    width: 80px;
    height: 80px;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
}

.custom-image-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    background: #f2f2f2;
}

.custom-input:focus,
.custom-textarea:focus {
    outline: 2px solid #cccccc;
    background: #f5f5f5;
}

#post-image {
    display: none;
}

.modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 28px 0 20px 0;
    background: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.footer-btn {
    min-width: 110px;
    padding: 10px 0;
    margin: 0;
    border: none;
    border-radius: 24px;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.12);
    background: #868e96;
    color: #fff;
    cursor: pointer;
    transition: all 0.18s;
    outline: none;
}

.footer-btn:active {
    background: #495057;
}

/* --- 貼文網格佈局 --- */

.content-grid {
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 10px;
    column-count: 4;
    column-gap: 15px;
    box-sizing: border-box;
}

.slider-viewport {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}
.posts-slider {
    display: flex;
    width: 200%;
    transition: transform 0.5s ease-in-out;
}

.posts-slider > .content-grid {
    width: 50%;
    flex-shrink: 0;
}


/* --- 貼文卡片 (Card) --- */
.card {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
    cursor: pointer;
    position: relative;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: transparent;
    border-bottom: none;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 15px;
    padding-right: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    background-color: transparent; ;
}

.username {
    font-weight: bold;
    font-size: 0.9em;
}

.card-content {
    margin-bottom: 15px;
    font-size: 1.0em;
    color: #333;
}

.card-content img {
    border-radius: 8px;
    width: 100%;
    margin-bottom: 10px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6c757d;
    font-size: 1.1em;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.left-icons,
.right-icon {
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.1s ease;
    pointer-events: auto;
}

.action-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 1.2em;
    vertical-align: middle;
}

.action-btn.like-button.liked i {
    color: #ff0000;
}


/* --- 響應式設計 (Media Queries) --- */

@media (max-width: 1200px) {
    .content-grid {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .content-grid {
        column-count: 2;
    }
    .search-container {
        flex-grow: 1;
        margin: 0 10px;
    }
    .top-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .logo,
    .user-nav {
        width: 100%;
        text-align: center;
    }
    .user-nav {
        margin-top: 5px;
    }
}

@media (max-width: 600px) {
    .slide-sidebar {
        width: 65vw;
        border-radius: 15px;
    }
    .fab-menu-btn {
        width: 34px;
        height: 34px;
        font-size: 1.1em;
    }
    .header-left {
        gap: 8px;
    }
    .logo {
        font-size: 1.11em;
    }
    .content-grid {
        column-count: 1;
    }
}


/* --- 其他元件 (下拉選單、Tabs、通知、檢舉) --- */

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 30px;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22%236c757d%22%3E%3Cpath%20d%3D%22M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%20011.414%201.414l-4%204a1%201%20001-1.414%200l-4-4a1%201%200010-1.414z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    height: auto;
    margin-bottom: 4px;
    cursor: pointer;
    background: #f2f2f2;
    border: none;
    border-radius: 14px;
    font-size: 1.05em;
    box-shadow: inset 0 4px 22px rgba(0, 0, 0, 0.10), inset 0 1.5px 7px rgba(120, 120, 120, 0.12);
    padding: 13px 17px;
    line-height: 1.2;
}

.custom-select:focus {
    outline: 2px solid #cccccc;
    background: #f5f5f5;
}

.card-content h3 {
    display: inline-block;
    margin-right: 10px;
}

.card-content .topic-display {
    display: inline-block;
    font-size: 0.8em;
    color: #868e96;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 5px;
    vertical-align: middle;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    gap: 1.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    background-color: #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.tab.active {
    background-color: #495057;
    color: white;
}

.styled-modal.comment-modal-content {
    display: flex;
    flex-direction: row;
    max-width: 820px;
    width: 96vw;
    min-height: 380px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(80, 80, 80, 0.13);
    position: relative;
}

.comment-modal-post-detail {
    flex: 1 1 0;
    padding: 32px 25px 28px 30px;
    border-right: 1px solid #eee;
    min-width: 260px;
    max-width: 370px;
    max-height: 75vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #a1a1a1 #f1f1f1;
}


.comment-modal-comment-section {
    flex: 1 1 0;
    padding: 32px 22px 20px 22px;
    display: flex;
    flex-direction: column;
    min-width: 260px;
}

.comment-modal-comment-list {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    max-height: 320px;
    margin-bottom: 18px;
    padding-right: 10px;
}

.comment-modal-comment-form textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-height: 50px;
    padding: 7px;
    resize: vertical;
    background: #f8f8fa;
    font-size: 1em;
}

.comment-modal-comment-form button {
    margin-top: 9px;
    width: 100%;
    background: #868e96;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 0;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
}

.close-comment-modal-btn {
    position: absolute;
    top: 16px;
    right: 22px;
    background: none;
    border: none;
    font-size: 2em;
    color: #bbb;
    cursor: pointer;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 13px;
}

.comment-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-item-content {
    width: 100%;
}

.comment-item-nickname {
    font-weight: 700;
    color: #495057;
}

.comment-item-text {
    color: #555;
}

.comment-item-time {
    font-size: 0.88em;
    color: #bfc4cc;
}

.reply-comment-btn {
    background: none;
    color: #868e96;
    border: none;
    cursor: pointer;
    font-size: 0.97em;
    padding: 0;
    margin: 0;
}

.notification-bell {
    font-size: 24px;
    color: white;
    cursor: pointer;
    position: relative;
    margin-right: 15px;
    text-decoration: none;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    display: none;
    min-width: 18px;
    text-align: center;
    box-sizing: border-box;
}

.notification-count.show {
    display: block;
}

        /* --- 彈出視窗：檢舉 (暗黑主題) --- */

/* 檢舉視窗的背景遮罩 */
.modal {
    /* 這裡的 .modal 規則與通用 .modal 重複，CSS 會應用所有不衝突的屬性，衝突的則以後者為準 */
    display: none; /* 預設隱藏 */
    position: fixed; /* 固定在視窗上 */
    z-index: 1000; /* 設定堆疊順序 */
    left: 0; /* 距離左側 0 */
    top: 0; /* 距離頂部 0 */
    width: 100%; /* 寬度 100% */
    height: 100%; /* 高度 100% */
    overflow: auto; /* 內容過長時可捲動 */
    background-color: rgba(0, 0, 0, 0.6); /* 設定半透明黑色背景 */
    backdrop-filter: blur(5px); /* 背景模糊效果 (毛玻璃) */
}

/* 檢舉視窗內容區 */
.report-modal-content {
    background-color: #2e2e2e; /* 設定深色背景 */
    color: #f0f0f0; /* 設定亮色文字 */
    margin: 10% auto; /* 設定外邊距 (垂直10%, 水平自動置中) */
    padding: 30px; /* 設定內邊距 */
    border: 1px solid #444; /* 設定邊框 */
    width: 90%; /* 寬度為 90% */
    max-width: 450px; /* 設定最大寬度 */
    border-radius: 12px; /* 設定圓角 */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* 設定陰影 */
    position: relative; /* 設定為相對定位 */
    animation: fadeIn 0.3s ease-out; /* 設定淡入動畫 */
}

/* 檢舉視窗標題 */
.modal-title {
    text-align: center; /* 文字置中 */
    font-size: 24px; /* 設定字體大小 */
    font-weight: bold; /* 設定字體為粗體 */
    margin-bottom: 25px; /* 設定下外邊距 */
    color: #fff; /* 設定文字顏色 */
    border-bottom: 2px solid #555; /* 設定底部邊框線 */
    padding-bottom: 15px; /* 設定下內邊距 */
}

/* 檢舉視窗關閉按鈕 (X) */
.close-button {
    color: #aaa; /* 設定顏色 */
    float: right; /* 向右浮動 */
    font-size: 32px; /* 設定字體大小 */
    font-weight: bold; /* 設定字體為粗體 */
    line-height: 1; /* 設定行高 */
    position: absolute; /* 設定為絕對定位 */
    top: 15px; /* 距離頂部 15px */
    right: 20px; /* 距離右側 20px */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    transition: color 0.2s ease-in-out; /* 設定顏色的過渡動畫 */
}

.close-button:hover,
.close-button:focus {
    color: #fff; /* 設定滑鼠移上或點擊時的顏色 */
    text-decoration: none; /* 移除底線 */
}

/* 檢舉選項 (Radio button + Label) */
.report-option {
    display: flex; /* 設定為 Flexbox 佈局 */
    align-items: center; /* 垂直置中子元素 */
    margin-bottom: 15px; /* 設定下外邊距 */
    font-size: 16px; /* 設定字體大小 */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    padding: 10px; /* 設定內邊距 */
    border-radius: 8px; /* 設定圓角 */
    transition: background-color 0.2s ease-in-out; /* 設定背景顏色的過渡動畫 */
}

.report-option:hover {
    background-color: #3a3a3a; /* 設定滑鼠移上時的背景顏色 */
}

/* 自訂 radio 按鈕樣式 */
.report-option input[type="radio"] {
    margin-right: 15px; /* 設定右外邊距 */
    -webkit-appearance: none; /* 移除原生樣式 */
    -moz-appearance: none; /* 移除原生樣式 */
    appearance: none; /* 移除原生樣式 */
    width: 20px; /* 設定寬度 */
    height: 20px; /* 設定高度 */
    border: 2px solid #666; /* 設定邊框 */
    border-radius: 50%; /* 設定圓角為圓形 */
    outline: none; /* 移除點擊時的外框 */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    position: relative; /* 設定為相對定位 */
    top: -1px; /* 向上微調位置 */
}

/* radio 按鈕被選中時的樣式 */
.report-option input[type="radio"]:checked {
    border-color: #007bff; /* 外框變色 */
}

/* radio 按鈕被選中時，中間的圓點 */
.report-option input[type="radio"]:checked::before {
    content: ''; /* 使用偽元素 content 產生內容 */
    display: block; /* 設定為區塊元素 */
    width: 10px; /* 設定寬度 */
    height: 10px; /* 設定高度 */
    background-color: #007bff; /* 設定背景顏色 */
    border-radius: 50%; /* 設定圓角為圓形 */
    position: absolute; /* 設定為絕對定位 */
    top: 50%; /* 距離頂部 50% */
    left: 50%; /* 距離左側 50% */
    transform: translate(-50%, -50%); /* 將元素本身向左上移動自身 50% 的寬高，以達到完美置中 */
}

/* 提交檢舉按鈕 */
.submit-button {
    background-color: #007bff; /* 設定背景顏色 */
    color: white; /* 設定文字顏色 */
    padding: 12px 25px; /* 設定內邊距 */
    border: none; /* 無邊框 */
    border-radius: 8px; /* 設定圓角 */
    cursor: pointer; /* 設定滑鼠樣式為手形 */
    display: block; /* 設定為區塊元素 */
    width: 100%; /* 寬度 100% */
    margin-top: 30px; /* 設定上外邊距 */
    font-size: 18px; /* 設定字體大小 */
    font-weight: bold; /* 設定字體為粗體 */
    transition: background-color 0.2s ease-in-out; /* 設定背景顏色的過渡動畫 */
}

.submit-button:hover {
    background-color: #0056b3; /* 設定滑鼠移上時的背景顏色 */
}

/* 淡入動畫的關鍵影格 */
@keyframes fadeIn {
    from {
        opacity: 0; /* 從透明度 0 開始 */
        transform: translateY(-20px); /* 從上方 20px 處開始 */
    }

    to {
        opacity: 1; /* 到透明度 1 結束 */
        transform: translateY(0); /* 到原位結束 */
    }
}

/* 資訊/檢舉按鈕圖示 */
.information-btn {
    color: #999; /* 設定顏色 */
}

.information-btn:hover {
    color: #007bff; /* 設定滑鼠移上時的顏色 */
}

/* 檢舉原因分類的區塊 */
.report-category {
    margin-bottom: 25px; /* 設定下外邊距 */
    padding: 15px; /* 設定內邊距 */
    background-color: #3a3a3a; /* 設定背景顏色 */
    border-radius: 8px; /* 設定圓角 */
    border: 1px solid #444; /* 設定邊框 */
}

/* 檢舉原因分類標題 */
.report-category h3 {
    font-size: 18px; /* 設定字體大小 */
    color: #fff; /* 設定文字顏色 */
    margin-top: 0; /* 無上外邊距 */
    margin-bottom: 15px; /* 設定下外邊距 */
    padding-bottom: 10px; /* 設定下內邊距 */
    border-bottom: 1px dashed #555; /* 設定底部虛線 */
}


.topic-display {
    display: inline-block;
    font-size: 0.8em;
    color: #868e96;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 5px;
    vertical-align: middle;
    white-space: nowrap;
}

/* --- 貼文瀏覽次數樣式 --- */
.post-view-count {
    margin-top: 15px; /* 與上方內容的間距 */
    padding-top: 10px; /* 頂部內邊距 */
    border-top: 1px solid #eee; /* 上方分隔線 */
    color: #868e96; /* 文字顏色 */
    font-size: 0.9em; /* 字體大小 */
    display: flex; /* 使用 flexbox 佈局 */
    align-items: center; /* 垂直置中 */
    gap: 6px; /* 圖示與文字的間距 */
}


/* --- 【新增】卡片內文長度限制 (顯示 '查看更多') --- */
.card-content p {
    /* 1. 設定相對定位，這是為了讓稍後的 ::after 偽元素能對齊它 */
    position: relative;

    /* 2. 計算並設定最大高度 (2 行的高度) */
    /* 計算方式: line-height * 行數。假設 line-height 是 1.6，2 行就是 3.2em */
    max-height: 3.2em;
    line-height: 1.6;

    /* 3. 隱藏超出最大高度的文字 */
    overflow: hidden;

    /* 其他既有樣式 */
    color: #333;
    margin: 0;
}

/* 4. 使用 ::after 偽元素來產生「...查看更多」的文字 */
.card-content p::after {
    /* 【關鍵】設定要顯示的文字內容 */
    content: "...更多";
    font-size: 1.0em;

    /* 將這段文字定位到父容器(p)的右下角 */
    position: absolute;
    bottom: 0;
    right: 0;

    /* 設定文字樣式 */
    color: #888; /* 灰色字體 */
    font-weight: bold; /* 粗體以示強調 */

    /* 設定背景，用來遮住被截斷的原文文字 */
    /* 背景色需與卡片背景色(白色)一致 */
    background: white;

    /* 讓文字和前面的 ... 之間有點空隙 */
    padding-left: 5px;
}


/* --- 載入更多按鈕樣式 --- */
.load-more-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more-btn:hover {
    background-color: #495057;
}

/* 載入中轉圈 (沿用您 admin_dashboard.html 中的樣式) */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #6c757d; /* 改為主題色 */
    animation: spin 1s ease infinite;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
