
:root {
    /* 溫馨暖色系調色盤 */
    --color-bg: #FDFBF7;         /* 奶白底色 */
    --color-text: #4A423E;       /* 柔和深咖啡/灰 */
    --color-primary: #F4D0C5;    /* 蜜桃粉 (按鈕、重點) */
    --color-primary-hover: #EBB6A8; 
    --color-secondary: #E8E3D9;  /* 暖燕麥 (標籤、留言底色) */
    --color-accent: #A3B19B;     /* 鼠尾草綠 (Hover狀態等) */
    --color-border: rgba(74, 66, 62, 0.08);
    
    /* 陰影設計 */
    --shadow-soft: 0 12px 32px rgba(200, 190, 180, 0.25);
    --shadow-hover: 0 16px 48px rgba(200, 190, 180, 0.45);
    
    /* 圓角設定 */
    --radius-box: 24px;
    --radius-btn: 9999px;
    --radius-img: 20px;
    --radius-small: 12px;
}

* { box-sizing: border-box; }

html { 
    max-width: 100vw; 
    overflow-x: hidden; 
}

body {
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0; 
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
}

a { color: var(--color-text); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--color-accent); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; margin-top: 0; color: var(--color-text); }

/* Card View 樣式 */
.box-view {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-box);
    padding: 36px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.box-view:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: #4A423E;
    padding: 12px 32px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(244, 208, 197, 0.4);
    transition: all 0.3s ease;
}
.btn:hover { background-color: var(--color-primary-hover); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(244, 208, 197, 0.6); color: #4A423E; }

/* 標籤 */
.tag {
    display: inline-block;
    font-size: 0.85em;
    padding: 6px 16px;
    background-color: var(--color-secondary);
    color: var(--color-text);
    border-radius: var(--radius-btn);
    margin-right: 8px;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Header 頁首區域修正：增加左右兩側內距 (Padding)，並強制保持上下居中結構 */
.site-header { 
    padding: 0; 
    margin: 24px 0 40px; 
}
.header-inner { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 20px; 
    padding: 32px 40px !important; /* 確保左右有充足的 padding，絕不貼邊 */
}
.site-title { 
    font-size: 2rem; 
    letter-spacing: -0.5px; 
    margin: 0; 
    text-align: center; 
    padding: 0 10px;
}
.nav-menu { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
    gap: 24px; 
    font-weight: 500; 
    justify-content: center;
    flex-wrap: wrap;
}

/* Layout */
.grid { display: grid; gap: 36px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.content-sidebar { display: grid; grid-template-columns: 2.2fr 1fr; gap: 48px; }

/* 圖片與文章卡片 */
.post-thumb {
    width: 100%; height: 240px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-img);
    margin-bottom: 24px;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text); font-weight: 500; opacity: 0.7;
    overflow: hidden;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-content p { margin-bottom: 24px; font-size: 1.05rem; }
.post-content img { border-radius: var(--radius-img); margin-bottom: 24px; box-shadow: var(--shadow-soft); max-width: 100%; height: auto; }

/* 分頁選單的分頁器樣式 */
.pagination { 
    grid-column: 1 / -1; 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 24px; 
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-secondary);
    border-radius: var(--radius-btn);
    color: var(--color-text);
    font-weight: 600;
}
.pagination .page-numbers.current {
    background: var(--color-primary);
}

/* 留言板樣式 */
.comments-area { margin-top: 60px; }
.comment-list { list-style: none; padding: 0; }
.comment-list li {
    background: var(--color-secondary);
    padding: 24px;
    border-radius: var(--radius-box);
    margin-bottom: 24px;
}
.comment-list li .comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: bold; }
.comment-list li .comment-meta { font-size: 0.85em; opacity: 0.7; margin-bottom: 16px; }

/* 閱讀進度條 */
.progress-container { width: 100%; height: 5px; position: fixed; top: 0; left: 0; z-index: 1000; }
.progress-bar { height: 100%; background: var(--color-primary); width: 0%; border-radius: 0 4px 4px 0; }

.site-footer { padding: 40px 0; text-align: center; margin-top: 60px; margin-bottom: 24px; font-size: 0.95em; }

/* 手機版響應式調校 */
@media (max-width: 800px) {
    .content-sidebar { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }
    .header-inner { padding: 24px 20px !important; gap: 16px; }
    .box-view { padding: 24px; margin-bottom: 24px; }
    .nav-menu { gap: 16px; }
    h1, h2 { font-size: 1.5rem !important; }
}
