:root {
	--bg-main: #f5f7fa;
	--bg-card: #ffffff;
	--bg-header: #1c1c1e;
	--bg-nav: #c6ddfb;
	--color-bg: #f5f7fa;
	--color-bg-secondary: #f8fafc;
	--color-card: #ffffff;
	--color-card-secondary: #f1f5f9;
	--color-text: #0f172a;
	--color-text-muted: #334155;
	--color-text-secondary: #eee;
	--text-main: #374151;
	--color-primary: #1e40af;
	--color-primary-hover: #1e3a8a;
	--color-border: rgba(15,23,42,.15);
	--border-color: rgba(15,23,42,.12);
	--shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
	--shadow-large: 0 10px 30px rgba(0,0,0,0.09);
}

/* 黑夜模式 */
body.dark {
	--bg-main: #0a0a0c;
	--bg-card: #1c1c1e;
	--bg-header: #000000;
	--bg-nav: #2c2c2e;
	--color-bg: #0b1220;
	--color-bg-secondary: #111827;
	--color-card: #172033;
	--color-card-secondary: #1d2940;
	--color-text: #f3f4f6;
	--color-text-muted: #9ca3af;
	--text-main: #eee;
	--color-primary: #38bdf8;
	--color-primary-hover: #0ea5e9;
	--color-border: rgba(255,255,255,.08);
	--border-color: rgba(255,255,255,.08);
	--shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
	--shadow-large: 0 10px 30px rgba(0,0,0,.35);
}

html {
	font-size: 16px; 
}

* { 
	margin: 0; 
	padding: 0; 
	box-sizing: border-box; 
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans TC", system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	background: var(--color-bg);
	color: var(--color-text);
}

/* --- 連結與選單動畫 --- */
a {
	position: relative;
	text-decoration: none;
	color: var(--color-primary);
	transition: opacity 0.2s ease;
}

a:hover {
	opacity: 0.8;
}

li.dropdown a, .dropdown-content a {
	position: relative;
	display: inline-block;
}

a::after { 
	content: '';
	position: absolute;
	width: 98%;
	height: 2px;
	bottom: -2px;
	left: 1%;
	background: #3498db;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease; 
}

a:hover::after { 
	transform: scaleX(1);
	transform-origin: left; 
}

ul {
    margin: 10px 0 10px 20px;
    padding: 0;
	}
.category-container ul {
	    margin: 0;
	}
	
	
/* --- Header 區塊 --- */
.header {
	padding: 32px 110px 28px 40px;
	border-bottom: 1px solid var(--color-border);
	background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #60a5fa 100%);
}

body.dark .header {
	background: linear-gradient(135deg, #0f172a 0%, #1e2937 50%, #334155 100%);
}

.header__topbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 32px;
	max-width: 1400px;
	margin: 0 auto;
}

.header__logo-area { 
	display: flex; 
	align-items: center; 
	gap: 18px; 
}

.header__logo {
	display: flex; 
	align-items: center; 
	justify-content: center;
}

.logo-img { 
	height: 80px; 
	width: 110px; 
}

.header__title h1 { 
	font-size: 34px; 
	font-weight: 800; 
	letter-spacing: -0.5px; 
	color: #ffffff !important;
}

.header__title p { 
	margin-top: 6px; 
	font-size: 15px; 
	color: #ffffff !important;
}

#limit-free { display: none; }

/* --- 搜尋區塊 --- */
.search { 
	flex: 1; 
	max-width: 780px; 
	margin: 0 auto; 
}

.search__box {
	display: flex; 
	border-radius: 9999px;
	border: 1px solid var(--color-border);
	background: var(--color-bg-secondary);
	box-shadow: 0 4px 15px rgba(0,0,0,.08);
	overflow: visible !important; 
	position: relative; 
}

.search__input {
	flex: 1; 
	border: none; 
	outline: none; 
	background: transparent;
	padding: 18px 26px 18px 15px !important; 
	font-size: 1rem;
	border-radius: 9999px 0 0 9999px; 
}

.search__select-wrapper {
	border-right: 1px solid var(--color-border, #eee);
	padding: 0 10px;
	display: flex;
	align-items: center;
}

.search__select {
	border: none;
	background: transparent;
	font-size: 14px;
	color: #666;
	outline: none;
	cursor: pointer;
}

.search__button {
	width: 76px;
	background: var(--color-primary);
	color: white;
	border: none;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 0 9999px 9999px 0;
	flex-shrink: 0 !important; 
}

.web_function {
    display: flex;
    gap: 16px;              /* 兩個連結之間的間距 */
    margin-top: 10px;       /* 與上方搜尋框的距離，微微微調更和諧 */
    padding-left: 4px;      /* 對齊搜尋框內縮 */
    align-items: center;
}

.web_function span {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.web_function a {
    color: #ffffff;                          /* 👑 完全依據指示：更改為純白色 */
    font-size: 14px;                         /* 適中的字體大小 */
    font-weight: 700;                        /* 👑 完全依據指示：改為粗字體 */
    text-decoration: none;                   /* 移除預設下底線 */
    transition: opacity 0.2s ease;           /* 白字改用透明度過渡，視覺感更高級 */
    padding: 2px 0;
}

/* 👑 優化 Font Awesome 6 圖示與中文字之間的右邊距 */
.web_function a i {
    margin-right: 6px;
    font-size: 13px;                         /* 圖示微調至與文字視覺等高 */
}

/* 滑鼠懸停（Hover）時的視覺變化 */
.web_function a:hover {
    opacity: 0.85;                           /* 懸停時優雅地呈現微微透光感 */
}

/* 精緻的底部白色裝飾線效果（滑鼠移入時由中間向兩旁展開） */
.web_function a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #ffffff;               /* 👑 裝飾底線同步改為純白色 */
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.web_function a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 在兩個連結中間加上精緻的垂直分隔線 */
.web_function span:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3); /* 👑 分隔線同步改為半透明白色，完美融入深色背景 */
    position: absolute;
    right: -9px;                                /* 剛好落在 gap 16px 的正中央 */
    top: calc(50% - 6px);
}

/* OS 導覽列美化 */
.os-nav {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding: 5px 10px;
    /* background: rgba(255, 255, 255, 0.05); */
    border-radius: 8px;
    justify-content: flex-end; /* 靠右對齊，與 web_function 對齊 */
}

.os-nav a {
    color: #f3f3f3;
    font-size: 1.75rem;
    transition: color 0.3s, transform 0.2s;
    text-decoration: none;
}

.os-nav a:hover {
    color: #ffd700;
    transform: scale(1.1);
}

/* 考慮到深色模式切換，顏色微調 */
[data-theme="dark"] .os-nav a {
    color: #aaa;
}
[data-theme="dark"] .os-nav a:hover {
    color: #fff;
}

body.dark .search__button {
	background: #1e40af;
}

body.dark .search__button:hover {
	background: #1e3a8a;
}

/* 搜尋預覽面板 */
.search-preview {
	position: absolute !important;
	top: calc(100% + 10px) !important;
	left: 10px;
	right: 10px;
	z-index: 99999 !important;
	background: var(--bg-card); 
	border: 1px solid var(--color-border);
	border-radius: 12px;
	box-shadow: var(--shadow-large);
	display: none; 
	max-height: 400px;
	overflow-y: auto;
	padding: 8px; 
}

.preview-item {
	padding: 12px 18px !important;
	cursor: pointer !important;
	transition: background 0.2s ease !important;
	display: block !important; 
	border-bottom: 1px solid rgba(0,0,0,0.05) !important; 
}

.preview-item:hover {
	background: #f8fafc !important; 
}

.preview-item:last-child {
	border-bottom: none !important;
}

/* 搜尋標頭區域 */
.search-header {
	background: var(--bg-card); 
	padding: 2rem;
	border-radius: 12px;
	margin-bottom: 2rem;
	box-shadow: 0 4px 6px rgba(0,0,0,0.05);
	border-left: 5px solid #3498db; 
}

.search-header h1 {
	font-size: 1.5rem;
	margin: 0 0 0.5rem 0;
	color: var(--text-main);
	display: flex;
	align-items: center;
	gap: 10px;
}

.search-header .keyword {
	color: #e74c3c; 
	font-weight: 800;
	background: rgba(231, 76, 60, 0.1);
	padding: 2px 8px;
	border-radius: 4px;
}

.search-meta {
	font-size: 0.95rem;
	color: var(--color-text-muted);
	margin: 0;
}

.search-notice {
	margin-top: 1rem;
	padding: 0.8rem 1rem;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	color: #856404;
	font-size: 0.9rem;
	border-radius: 4px;
}

/* --- 分類導航列 --- */
.category-bar { 
	background-color: var(--bg-nav); 
	border-bottom: 1px solid var(--border-color); 
	position: sticky; 
	top: 0; 
	z-index: 1000; 
}

.menu-toggle { 
	display: none; 
	width: 100%; 
	padding: 12px; 
	background: var(--bg-header); 
	color: white; 
	border: none; 
	font-size: 16px; 
	cursor: pointer; 
}

.category-container { 
	max-width: 1200px; 
	margin: 0 auto; 
}

.category-container ul { 
	display: flex; 
	list-style: none; 
}

.category-bar li { 
	position: relative; 
} 

.category-bar li a { 
	display: block; 
	padding: 12px 18px; 
	color: var(--text-main); 
	text-decoration: none; 
	font-weight: 600; 
	white-space: nowrap; 
}

.dropdown-content {
	display: none; 
	position: absolute; 
	top: 100%; 
	left: 0;
	background-color: var(--color-text-secondary); 
	min-width: 200px;
	box-shadow: var(--shadow); 
	border: 1px solid var(--border-color); 
	z-index: 10001;
}

.dropdown-content a { 
	padding: 10px 15px; 
	font-weight: normal !important; 
	border-bottom: 1px solid var(--border-color); 
}

body.dark .dropdown-content {
	background-color: #1e272e;
	color: #f1f2f6;
}

/* 子分類群組 */
.sub-category-list {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed #eee;
}

.nav-title {
	font-size: 13px;
	color: #888;
	margin-right: 5px;
}

.sub-cat-btn {
	display: inline-block;
	padding: 3px 10px;
	margin: 3px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 3px;
	color: #333;
	text-decoration: none;
	font-size: 13px;
}

.sub-cat-btn.is-active {
	background: #ff9800; 
	color: #fff;
	border-color: #e68a00;
	font-weight: bold;
}

.sub-cat-btn:hover:not(.is-active) {
	background: #0056b3;
	color: #fff;
}

body.dark .sub-cat-btn {
    background: #888;
    color: #eee;
	}
	
/* 導航 - 黑夜模式 */
.nav__link {
	font-weight: 700;
	transition: all 0.2s ease;
}

body.dark .nav { 
	background: rgba(15,23,42,.95); 
}

body.dark .nav__link {
	color: #cbd5e1;
}

/* --- 版面主結構 --- */
.layout { 
	max-width: 1400px; 
	margin: 40px auto; 
	padding: 0 24px; 
}

.layout__grid { 
	display: grid; 
	grid-template-columns: 65% 35%; 
	gap: 32px; 
}

/* --- 卡片整體設計 --- */
.software-card, .sidebar-card {
	margin-bottom: 1.5rem;
	border-radius: 24px;
	border: 1px solid var(--color-border);
	background: linear-gradient(180deg, var(--color-card), var(--color-card-secondary));
	overflow: hidden;
	box-shadow: var(--shadow-large);
	transition: all 0.35s ease;
}

.card-body { 
    display: grid;
    padding: 28px; 
	gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-body:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-body h3 {
    position: relative;
}

.card-body small {
    /* 在 Grid 佈局中，請改用 justify-self */
    justify-self: end; 
    text-align: right;    
}

.sidebar-card .card-body {
	    display: block;
	}

/* 4:6 左右佈局主容器 */
.card-content {
	display: flex;
	gap: 20px;               
	padding: 15px;
	width: 100%;
	box-sizing: border-box;
	align-items: center;
	color: #2c3e50;
	min-width: 0;
	overflow-wrap: break-word;
}

body.dark .card-content {
	background-color: #1e272e;
	color: #f1f2f6;
}

.software-card .card-content {
	display: flex;
	align-items: flex-start; 
	gap: 20px;
	padding-top: 10px;
	margin-bottom: 24px;
}

.sidebar-card .card-content { 
	flex-direction: column; 
	gap: 20px; 
}

/* 左側圖片區塊 (45%) */
.software-card .card-thumbnail {
	flex: 4.5;               
	min-width: 0;
	width: 100%;
	aspect-ratio: 3 / 2;     
	overflow: hidden;
	background-color: #f8f9fa; 
	box-sizing: border-box;
	flex-shrink: 0;
	border: 1px solid #e9ecef; 
	border-radius: 0.5rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.sidebar-card .card-thumbnail { 
	height: auto; 
	flex: 0 0 100%;
	max-width: 100%;
}

.software-card .card-thumbnail img.software-icon {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center; 
	display: block;
}

.software-icon {
	max-width: 100%;     
	max-height: 100%;    
	object-fit: contain; 
}

/* 右側文字區塊 (55%) */
.software-card .card-description {
	flex: 5.5;
	min-width: 0;
}

.card-description {
	flex: 0 0 55%;
	max-width: 55%;
	display: flex;
	flex-direction: column;
	color: var(--color-text-muted); 
	font-size: 15.5px; 
	line-height: 1.85;
}

.sidebar-card .card-description { 
	height: auto; 
	flex: 0 0 100%;
	max-width: 100%;
}

.highlight-text {
	font-size: 1.15rem;
	font-weight: bold;
	margin: 0 0 10px 0;
	line-height: 1.4;
	color: #e74c3c; 
}

body.dark .highlight-text {
	color: #ff4757; 
}

.description-text {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    text-align: justify;
    color: #57606f;
    max-height: 260px;
    overflow: hidden;
}

body.dark .description-text {
	color: #ced4da;
}

/* --- 標籤與徽章管理 --- */
.card-badges { 
	display: flex; 
	gap: 12px; 
	margin-bottom: 20px; 
}

.card-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px; 
	padding: 2px 6px;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: bold;
	margin-bottom: 8px;
	margin-right: 6px;
	color: #fff; 
	vertical-align: middle;
}

.card-badge--headline { background: #ff4500; } 
.card-badge--headline i { color: #ffd700; }    

.card-badge--recommend { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; } 

.card-badge--free { background: #28a745; }    
.card-badge--multi { background: #17a2b8; }   
.card-badge--chinese { background: #007bff; }

.recommend {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: linear-gradient(135deg, #ffd700, #ff8c00);
	color: #000;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: bold;
	margin-bottom: 8px;
	width: fit-content;
}

.recommend i { font-size: 0.7rem; }

.headlines {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #ff4500; 
	color: #fff;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: bold;
	margin-bottom: 8px;
	width: fit-content;
	margin-right: 5px; 
}

.headlines i { color: #ffd700; }

/* 底部標籤區塊 */
.card-tags {
	display: flex;
	gap: 6px;
}

.card-tags .tag {
	background-color: #3f51b5; 
	color: #ffffff;
	padding: 2px 10px;
	border-radius: 12px;      
	font-size: 1rem;          
	font-weight: normal;
	display: inline-block;
	line-height: 1.4;
}

.card-tags .tag:first-child {
	background-color: #d15133; 
}

.card-tags .tag:last-child {
	background-color: #6c757d; 
	opacity: 0.9;
}

/* --- 卡片標題與點擊觸發感 --- */
.card-title {
	display: flex;
	align-items: center;
	gap: 8px; 
	margin: 10px 0;
	text-decoration: none;
	color: #333;                     
}

body.dark .card-title {
	text-decoration: none;
	color: #fff;                     
}

.card_name_icon {
	color: #555;   
	min-width: 20px;
	text-align: center;
}

body.dark .card_name_icon {
		color: #eee;   
	}

.touch-target {
	text-decoration: none !important; 
	display: block;                  
	position: relative;
}

.touch-target:hover .card-title {
	text-decoration: none;           
	opacity: 0.7;                    
	transition: opacity 0.2s;        
}

.touch-target::after {
	content: '';
	position: absolute;
	width: 98%;
	height: 2px;
	bottom: -2px; 
	left: 1%;
	background: #3498db;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease;
}

.touch-target:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* --- 卡片底部頁尾與更新時間 --- */
.card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0; 
	margin-top: auto;              
}

body.dark .card-footer {
	border-top: 1px solid #334155; 
}

.card-footer-text {
	font-size: 1rem;
	color: #888;
	font-weight: bold;
	position: relative; 
	overflow: visible;  
}

.card-footer-text a {
	position: relative;
	display: inline-block; 
	text-decoration: none;
}

.card-refresh-date {
	color: #a2afb9;
	font-weight: 700;
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	font-size: 1.5rem;
}

.sidebar-card .card-refresh-date {
	font-size: 1.3rem;
}

/* --- 使用資訊清單排版 --- */
.file_title.use_title {
	margin-top: 1rem;
	padding: 0 1rem;
}

.use_information_ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.use_information_ul li {
	display: flex;
	position: relative;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin-bottom: 6px; 
}

.use_title_link {
	display: inline-flex;
	align-items: center;
	gap: 6px; 
}

.use_title_view {
	margin-left: auto;
	white-space: nowrap; 
}

/* --- 分頁按鈕樣式 --- */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 40px 0;
	padding: 20px;
	width: 100%;       
	flex-wrap: wrap;   
	clear: both;       
}

.pagination button {
	padding: 10px 18px;
	border: 1px solid var(--color-border);
	background: var(--color-card);
	color: var(--color-text);
	cursor: pointer;
	border-radius: 12px;
	font-weight: 600;
	transition: all 0.3s ease;
	min-width: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pagination button.active {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
	box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.pagination button:hover:not(:disabled):not(.active) {
	background: var(--color-card-secondary);
	border-color: var(--color-primary);
	transform: translateY(-2px);
}

.pagination button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pagination span {
	color: var(--color-text-muted);
	padding: 0 10px;
}

.page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	text-decoration: none;
	color: var(--text-main);
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.page-btn:hover {
	background: #3498db;
	color: #fff;
	border-color: #3498db;
}

.page-btn.active {
	background: #3498db;
	color: #fff;
	border-color: #3498db;
	cursor: default;
}

.dots {
	color: var(--color-text-muted);
	padding: 0 5px;
}

/* --- 管理員齒輪與元件 --- */
.admin-quick-edit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: rgba(255, 0, 0, 0.1); 
	border: 1px solid rgba(255, 0, 0, 0.3);
	border-radius: 4px;
	color: #ff0000;
	text-decoration: none;
	margin-left: 8px;
	transition: all 0.3s ease;
	vertical-align: middle;
}

.admin-quick-edit:hover {
	background: #ff0000;
	color: #ffffff;
	transform: rotate(90deg); 
	box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.admin-quick-edit::before {
	content: '⚙';
	font-size: 16px;
}

.theme-toggle {
	position: fixed;
	top: 8px; right: 40px; z-index: 10000;
	width: 54px; height: 54px;
	border-radius: 16px;
	border: none;
	background: none;
	color: #eee;
	display: flex; align-items: center; justify-content: center;
	font-size: 2rem; cursor: pointer;
	box-shadow: none;
}

#themeToggleButton svg {
	stroke: currentColor; 
}

#themeToggleButton .icon-sun { display: none; }
#themeToggleButton .icon-moon { display: block; }

body.dark #themeToggleButton .icon-sun { display: block; }
body.dark #themeToggleButton .icon-moon { display: none; }

#themeToggleButton:hover {
	--text-main: #2563EB; 
}

body.dark #themeToggleButton:hover {
	--text-main: #FDE68A; 
}

#backToTop {
	position: fixed; bottom: 30px; right: 30px;
	width: 50px; height: 50px;
	background: var(--color-primary); color: white;
	border: none; border-radius: 50%; font-size: 24px;
	cursor: pointer; box-shadow: var(--shadow-large);
	display: none; align-items: center; justify-content: center;
	z-index: 9999;
}

.footer {
	margin-top: 60px;
	padding: 40px 24px;
	text-align: center;
	color: var(--color-text-muted);
	border-top: 1px solid var(--color-border);
}

.mobile-arrow {
	display: none; 
}

.admin-controls {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
	margin-left: 10px;
}

/* 右側教學欄位 */
.tutorial-block { background: var(--bg-card); padding: 15px; border-radius: 24px; border: 1px solid var(--border-color); }
.tutorial-block h2 { font-size: 1.1rem; margin-top: 0; padding-bottom: 5px; border-bottom: 2px solid var(--border-color); color: var(--text-main); display: flex; align-items: center; }
.side_information_ul { list-style: none; padding: 0; margin: 0; }
.side_information_ul li { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px dashed var(--border-color); }
.side_information_ul a { text-decoration: none; color: var(--text-main); font-size: 0.95rem; }
.side_information_ul a:hover { color: var(--color-primary); }
.fa-lg-blue { color: var(--color-primary); margin-right: 5px; }
.fa-lg-gray { color: var(--text-main-muted); margin-right: 5px; }
.side_information_ul div { position: relative; padding: 0.25rem;}
.side_information_ul li div:nth-child(2) {margin-left: 1.25rem;}

.site-footer {
    background-color: var(--bg-card); /* 對應卡片背景色 */
    border-top: 1px solid var(--border-color);
    padding: 40px 24px 30px 24px;
    transition: var(--ft-transition, all 0.25s ease);
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer-nav {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.site-footer-link {
    display: inline-block;
    color: var(--color-text); /* 對應全站主文字色 */
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    margin: 0 16px;
    transition: var(--ft-transition, all 0.25s ease);
}

.site-footer-link:hover {
    color: var(--color-primary); /* 對應全站主色 */
}

.site-footer-link i {
    margin-right: 6px;
    color: var(--color-text-muted);
}

.site-footer-link:hover i {
    color: var(--color-primary);
}

.site-footer-meta {
    text-align: center;
    line-height: 1.8;
}

.site-footer-copyright {
    font-size: 13.5px;
    color: var(--color-text);
}

.site-footer-statement {
    font-size: 12.5px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* 響應式調整 */
@media (max-width: 640px) {
    .site-footer { padding: 30px 16px 24px 16px; }
    .site-footer-link { display: block; margin: 12px 0; }
}

    .privacy-container {
        max-width: 900px;
        margin: 40px auto;
        padding: 40px;
        background-color: var(--bg-card);
        border-radius: 12px;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-color);
        color: var(--color-text);
        line-height: 1.8;
    }
    .privacy-container h1 {
        font-size: 2em;
        margin-bottom: 30px;
        color: var(--color-primary);
        border-bottom: 2px solid var(--color-primary);
        padding-bottom: 10px;
    }
    .privacy-container h2 {
        font-size: 1.5em;
        margin-top: 30px;
        margin-bottom: 15px;
        color: var(--color-text);
    }
    .privacy-container p {
        margin-bottom: 15px;
        color: var(--color-text-muted);
    }
    .privacy-container ul {
        margin-bottom: 20px;
        padding-left: 25px;
    }
    .privacy-container li {
        margin-bottom: 8px;
        color: var(--color-text-muted);
    }

    /* RWD 響應式佈局 */
    @media (max-width: 768px) {
        .privacy-container {
            margin: 20px 15px;
            padding: 25px;
        }
    }

/* ==========================================================================
   響應式斷點與佈局優化 (由大至小排列)
   ========================================================================== */

/* --- 2.5K 超大型螢幕延伸支援 --- */
@media (min-width: 2100px) {
	.layout, .use_layout {
		max-width: 1900px;
	}
}

/* --- 桌機端特有互動行為 (寬度大於 1024px) --- */
@media (min-width: 1025px) {
	.category-container ul { 
		display: flex !important; 
	}
	.dropdown:hover .dropdown-content { 
		display: block !important; 
	}
}

/* --- 平板與行動裝置主斷點 (<= 1024px) --- */
@media (max-width: 1024px) {
	.header { padding: 20px 16px; }
	.header__title h1 { font-size: 24px; }
	.header__topbar { flex-direction: column; gap: 15px; }
	
	.nav__inner { display: none; } 
	.mobile-nav { display: flex; } 

	.menu-toggle#mobile-menu-btn {
		display: block !important;
		width: 100%;
		padding: 12px;
		background-color: var(--bg-card);
		color: var(--text-main);
		border: 1px solid var(--border-color);
		border-radius: 8px;
		font-size: 16px;
		font-weight: bold;
		text-align: center;
		cursor: pointer;
		margin-bottom: 5px;
		box-sizing: border-box;
	}

	.layout { padding: 15px; margin: 10px auto; }

	/* iPad Air 保持精準雙欄 */
	.layout__grid { 
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
		gap: 20px; 
	}
	
	.mobile-arrow {
        display: inline-block;
        float: right;
        margin-top: 5px;
        transition: transform 0.3s ease;
    }
	
    .dropdown.is-active .dropdown-content {
        display: block !important;
        position: static;
        width: 100%;
        box-shadow: none;
    }
	
	.category-container { width: 100%; overflow: hidden; }
	.category-container ul#dynamic-menu { 
		display: none !important; 
		flex-direction: column; 
		width: 100%; 
		background: var(--bg-card); 
		max-height: 70vh; 
		overflow-y: auto; 
		box-sizing: border-box;
		padding: 0;
		margin: 0;
		list-style: none;
	}
	.category-container ul#dynamic-menu.is-active { display: flex !important; } 

	/* 卡片內容自適應堆疊與防截斷 */
	.software-card .card-content { 
		flex-direction: column; 
		align-items: stretch;
		gap: 15px;
	}

	.software-card .card-thumbnail { 
		flex: none !important;
		width: 100% !important;
		max-height: 300px; 
		overflow: hidden;
		display: flex;
		justify-content: center;
		align-items: center;
		background: #f0f0f0;
		border-radius: 8px;
	}
	
	.software-card .card-thumbnail img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	.software-card .card-description {
		flex: none !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-top: 15px;
		line-height: 1.7; 
		color: var(--color-text-muted);
		font-size: 15px;
		display: block !important;    
		-webkit-line-clamp: none !important; 
		overflow: visible !important;  
		text-overflow: clip;
		height: auto;
	}
	.sidebar-card { width: 100%; margin-bottom: 20px; }
	.search__button { width: 50px; }
	.search { width: 100%; margin: 0 auto; }
	.card-refresh-date {font-size: 0.75rem;}
	.card-body {padding: 10px;}
	.card-badge {font-size: 0.6rem;}
}

/* 手機橫屏特殊處理 - 獨立拉出，避免巢狀 */
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
	.header { padding: 6px 15px !important; }
	.header__topbar { flex-direction: row !important; justify-content: space-between; align-items: center; gap: 15px; }
	.header__title h1 { font-size: 20px !important; margin: 0; }
	.header__title p { display: none; } 
	/* .search-bar { max-width: 280px; margin: 0 !important; } */
	/* .search-bar input { padding: 5px 10px; } */
	.menu-toggle#mobile-menu-btn { padding: 5px !important; margin: 4px 0 !important; font-size: 14px !important; }
	.layout { padding: 5px 10px; }
	.layout__grid { grid-template-columns: 1fr 1fr !important; gap: 12px; }
	.software-card .card-thumbnail { max-height: 140px !important; }
	.card-title { font-size: 1rem; margin-top: 5px; }
	.software-card .card-description {
		display: -webkit-box !important;
		-webkit-line-clamp: 6; 
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 14px;
		margin-top: 8px;
	}
	.card-tags .tag {
		font-size: 0.75rem;
	}
}

/* --- 行動端選單與分頁微調 (<= 768px) --- */
@media (max-width: 768px) {
	.card-content {
		flex-direction: column;
	}
	.card-thumbnail, .card-description {
		flex: 0 0 100%;
		max-width: 100%;
	}
	.pagination {
		gap: 5px;
	}
	.pagination button {
		padding: 8px 12px;
		font-size: 14px;
	}
	.mobile-arrow {
		display: inline-block;
		float: right;
		margin-top: 5px;
		transition: transform 0.3s ease; 
	}
	.dropdown.is-active .dropdown-content {
		display: block !important;
		position: static; 
		width: 100%;
		box-shadow: none;
		background: var(--color-bg-secondary);
	}
	.dropdown.is-active .mobile-arrow {
		transform: rotate(180deg);
	}
	.card-title, .description-text {
		font-size: 1rem;
	}
}

/* --- 直向窄螢幕小手機 (<= 600px) --- */
@media (max-width: 600px) {
	.layout__grid { 
		grid-template-columns: 1fr; 
	}
	.software-card .card-thumbnail { 
		max-height: 200px; 
	}
}

@media (max-width: 480px) {
	.page-btn {
		min-width: 35px;
		height: 35px;
		font-size: 0.85rem;
	}
	.search__input {
		font-size: 0.75rem;
	}
	.search-header {
		padding: 1rem;
	}
	.search__select-wrapper {
		padding: 0 4px;
	}
}