/* 自定義高級感淺色調與毛玻璃效果 */

/* 全站基準字級微幅放大，提升閱讀感 */
:root {
  --global-font-size: 16.5px;
}

/* 全域背景：暖白底，減少預設科技藍感 */
[data-theme='light'] body {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #f3ece2 0%, #ebe1d4 100%) !important;
  color: #2f2b27;
}

/* 內容卡片：暖白底色 + 柔和陰影 */
[data-theme='light'] #aside-content .card-widget,
[data-theme='light'] #content-inner .layout > .recent-posts .recent-post-item,
[data-theme='light'] #content-inner .layout > #page,
[data-theme='light'] #content-inner .layout > #post,
[data-theme='light'] #content-inner .layout > .archive,
[data-theme='light'] #content-inner .layout > .category,
[data-theme='light'] #content-inner .layout > .tag,
[data-theme='light'] #content-inner .layout > .category-content,
[data-theme='light'] #content-inner .layout > .tag-content {
  background: rgba(255, 252, 247, 0.82) !important;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(138, 122, 99, 0.12);
  box-shadow: 0 20px 50px -28px rgba(58, 49, 37, 0.22) !important;
  border-radius: 18px;
}

/* 導航欄：暖白毛玻璃 */
[data-theme='light'] #nav {
  background: rgba(239, 232, 223, 0.82) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(138, 122, 99, 0.16);
  box-shadow: 0 18px 40px -32px rgba(58, 49, 37, 0.24) !important;
}

/* 導航欄文字顏色 */
[data-theme='light'] #nav a,
[data-theme='light'] #nav .site-name,
[data-theme='light'] #nav .menus_items .menus_item a,
[data-theme='light'] #nav span.site-page,
[data-theme='light'] #nav #toggle-menu,
[data-theme='light'] #nav #blog-info {
  color: #2f3640 !important;
  text-shadow: none !important;
}

[data-theme='light'] #nav .site-name {
  letter-spacing: 0.08em;
  font-weight: 600;
}

[data-theme='light'] #nav a,
[data-theme='light'] #nav span.site-page,
[data-theme='light'] #nav .site-name {
  font-size: 1rem;
}

/* Header hover / fixed 狀態統一成香檳棕 */
[data-theme='light'] #nav a:hover,
[data-theme='light'] #nav span.site-page:hover,
[data-theme='light'] #nav #toggle-menu:hover,
[data-theme='light'] #nav #blog-info:hover,
[data-theme='light'] #page-header.nav-fixed #nav a:hover,
[data-theme='light'] #page-header.nav-fixed #nav span.site-page:hover,
[data-theme='light'] #page-header.nav-fixed #nav #toggle-menu:hover,
[data-theme='light'] #page-header.nav-fixed #nav #blog-info:hover {
  color: #8a7a63 !important;
}

/* 目前頁面與下拉選單 */
[data-theme='light'] #nav .site-page.active,
[data-theme='light'] #nav .menus_items .menus_item.active > a {
  color: #8a7a63 !important;
}

[data-theme='light'] #nav .menus_items .menus_item .menus_item_child {
  background: rgba(255, 251, 246, 0.96) !important;
  border: 1px solid rgba(138, 122, 99, 0.12);
  box-shadow: 0 20px 45px -28px rgba(58, 49, 37, 0.35) !important;
  backdrop-filter: blur(18px);
}

[data-theme='light'] #nav .menus_items .menus_item .menus_item_child li:hover {
  background: rgba(138, 122, 99, 0.08) !important;
}

/* 側邊欄標籤雲 (淺色版優化) */
[data-theme='light'] #aside-content .card-tag-cloud a {
  background: rgba(138, 122, 99, 0.08) !important;
  color: #746552 !important;
  border: 1px solid rgba(138, 122, 99, 0.14);
}

[data-theme='light'] #aside-content .card-tag-cloud a:hover {
  background: #8a7a63 !important;
  color: #fdfaf6 !important;
}

/* 作者卡社群連結：覆蓋主題內聯白色，避免在淺底消失 */
[data-theme='light'] #aside-content .card-info-social-icons {
  margin-top: 12px;
}

[data-theme='light'] #aside-content .card-info-social-icons .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 8px;
  border: 1px solid rgba(138, 122, 99, 0.16);
  background: rgba(138, 122, 99, 0.08);
  border-radius: 999px;
  transition: all 0.25s ease;
}

[data-theme='light'] #aside-content .card-info-social-icons .social-icon i {
  color: #5f6763 !important;
}

[data-theme='light'] #aside-content .card-info-social-icons .social-icon:hover {
  background: #8a7a63;
  border-color: #8a7a63;
  transform: translateY(-1px);
}

[data-theme='light'] #aside-content .card-info-social-icons .social-icon:hover i {
  color: #fffdf9 !important;
}

/* 文章標題與內文顏色優化 */
[data-theme='light'] h1, 
[data-theme='light'] h2, 
[data-theme='light'] h3 {
  color: #5a5f59 !important;
}

[data-theme='light'] p, 
[data-theme='light'] li {
  color: #4f4a44 !important;
  font-size: 1.04rem;
  line-height: 1.9;
}

[data-theme='light'] a {
  color: #746552;
}

[data-theme='light'] a:hover {
  color: #8a7a63;
}

/* 首頁文章卡與內頁主標題改為柔和暖灰，避免過重 */
[data-theme='light'] #recent-posts .recent-post-item > .recent-post-info > .article-title,
[data-theme='light'] #post .post-title,
[data-theme='light'] #page .page-title {
  color: #5f6763 !important;
}

[data-theme='light'] #recent-posts .recent-post-item > .recent-post-info > .article-title {
  font-size: 1.68em;
  line-height: 1.45;
}

[data-theme='light'] #post .post-title,
[data-theme='light'] #page .page-title {
  letter-spacing: 0.01em;
}

[data-theme='light'] #post {
  font-size: 1.03rem;
}

/* 頁首封面文字陰影 (淺色模式加強讀取度) */
[data-theme='light'] #site-title,
[data-theme='light'] #site-subtitle {
  color: #ffffff !important;
  text-shadow: 0 10px 30px rgba(34, 26, 19, 0.28) !important;
}

/* Header 遮罩：保留對比，但不要髒灰 */
[data-theme='light'] #page-header:before {
  background:
    linear-gradient(180deg, rgba(34, 26, 19, 0.24) 0%, rgba(34, 26, 19, 0.1) 45%, rgba(34, 26, 19, 0.2) 100%) !important;
}

/* 文章頁封面通常偏深，額外補強遮罩與資訊區對比 */
[data-theme='light'] #page-header.post-bg:before {
  background:
    linear-gradient(180deg, rgba(18, 14, 10, 0.48) 0%, rgba(18, 14, 10, 0.32) 42%, rgba(18, 14, 10, 0.56) 100%) !important;
}

[data-theme='light'] #page-header #post-info {
  left: 0;
  right: 0;
  bottom: 0 !important;
  display: block;
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: none;
  background: linear-gradient(180deg, rgba(27, 21, 16, 0.42) 0%, rgba(27, 21, 16, 0.28) 100%);
  border-top: 1px solid rgba(255, 248, 240, 0.12);
  border-bottom: 1px solid rgba(255, 248, 240, 0.12);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  text-align: center;
  transform: none;
}

[data-theme='light'] #page-header #post-info .post-title {
  color: #fffdf9 !important;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.38) !important;
}

[data-theme='light'] #page-header #post-info #post-meta,
[data-theme='light'] #page-header #post-info #post-meta a,
[data-theme='light'] #page-header #post-info #post-meta .post-meta-label,
[data-theme='light'] #page-header #post-info #post-meta time {
  color: rgba(255, 247, 239, 0.88) !important;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

[data-theme='light'] #page-header #post-info #post-meta a:hover {
  color: #f2decb !important;
}

[data-theme='light'] #post > #post-info {
  margin-bottom: 0 !important;
}

[data-theme='light'] #page-header.post-bg + #content-inner.layout {
  padding-top: 18px;
  margin-top: -1px;
}

[data-theme='light'] #page-header.post-bg + #content-inner.layout > #post {
  margin-top: -10px;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}

@media (max-width: 768px) {
  [data-theme='light'] #post-info {
    padding: 1.15rem 1rem;
    width: 100%;
  }

  [data-theme='light'] #page-header.post-bg + #content-inner.layout {
    padding-top: 12px;
  }

  [data-theme='light'] #page-header.post-bg + #content-inner.layout > #post {
    margin-top: -6px;
  }
}

/* Footer 頁尾 */
[data-theme='light'] #footer {
  background: #dfd2c2 !important;
  color: #625b53 !important;
  border-top: 1px solid rgba(138, 122, 99, 0.18);
}

[data-theme='light'] #footer-wrap a {
  color: #625b53 !important;
  text-decoration: none;
  transition: color 0.3s;
}

[data-theme='light'] #footer-wrap a:hover {
  color: #8a7a63 !important;
}

/* 移除頁尾過重的陰影感 */
[data-theme='light'] #footer #footer-wrap {
  text-shadow: none !important;
}

/* 捲軸美化 (淺色版) */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #e8ddd0;
}
::-webkit-scrollbar-thumb {
  background: #c9bdab;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8a7a63;
}
