/* home.css 压缩版 - 一个元素占用一行 */
:root { --bg: #fafbfc; --bg-card: #ffffff; --text: #1a202c; --text-2: #4a5568; --text-3: #718096; --accent: #3b82f6; --accent-hover: #2563eb; --accent-alpha: rgba(59, 130, 246, 0.1); --radius: 12px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --bg-hover: rgba(59, 130, 246, 0.05); --border: rgba(0, 0, 0, 0.08); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04); --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.06); --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.08); --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12); --shadow-dark: inset 0 2px 4px rgba(0, 0, 0, 0.06); --ease: cubic-bezier(0.4, 0, 0.2, 1); --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); --duration-fast: .2s; --duration-normal: .3s; --z-header: 999; --z-panel: 1000; --z-side: 1001; }
[data-theme="dark"] { --bg: #0f172a; --bg-card: #1e293b; --text: #f1f5f9; --text-2: #cbd5e1; --text-3: #94a3b8; --accent: #60a5fa; --accent-hover: #3b82f6; --accent-alpha: rgba(96, 165, 250, 0.15); --bg-hover: rgba(96, 165, 250, 0.08); --border: rgba(255, 255, 255, 0.1); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.4); --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.5); --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6); --shadow-dark: inset 0 2px 4px rgba(0, 0, 0, 0.4); }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; transition: background var(--duration-normal) var(--ease), color var(--duration-normal) var(--ease); }
header { position: sticky; top: 0; height: 64px; z-index: calc(var(--z-side) + 1); background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; align-items: center; transition: all var(--duration-fast) var(--ease); }
[data-theme="dark"] header { background: rgba(15, 23, 42, 0.8); }
nav { max-width: 1200px; width: 100%; margin-inline: auto; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.5rem; box-sizing: border-box; }
.logo { font-size: 1.5rem; font-weight: 700; background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; flex-shrink: 0; transition: transform var(--duration-fast) var(--ease); }
.logo:hover { transform: scale(1.05); }
.nav-group { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.5rem; margin-left: auto; }
.nav-item { padding: 0.5rem 1rem; border-radius: 10px; text-decoration: none; color: var(--text-2); background: transparent; border: 1px solid transparent; cursor: pointer; transition: all var(--duration-fast) var(--ease); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 500; }
.nav-item:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--border); transform: translateY(-1px); }
.nav-item:active { transform: translateY(0); }
.blog-home-page-cards { max-width: 1200px; margin: 2rem auto; padding: 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem; }
.blog-home-page-card { background: var(--bg-card); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-light); border: 1px solid var(--border); transition: all var(--duration-normal) var(--ease); position: relative; overflow: hidden; }
.blog-home-page-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #8b5cf6); transform: scaleX(0); transform-origin: left; transition: transform var(--duration-normal) var(--ease); }
.blog-home-page-card:hover::before { transform: scaleX(1); }
.blog-home-page-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--accent-alpha); }
.blog-home-page-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 0 0 1rem; line-height: 1.3; transition: color var(--duration-fast) var(--ease); }
.blog-home-page-card:hover h2 { color: var(--accent); }
.blog-home-page-card p { color: var(--text-2); line-height: 1.7; margin: 0 0 1rem; }
.read-more { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: all var(--duration-fast) var(--ease); position: relative; }
.read-more::after { content: "→"; transition: transform var(--duration-fast) var(--ease); }
.read-more:hover { color: var(--accent-hover); gap: 0.75rem; }
.read-more:hover::after { transform: translateX(4px); }
@media (min-width: 1024px) { body { display: grid; grid-template-areas: "head head" "side main" "foot foot"; grid-template-columns: 280px 1fr; grid-template-rows: auto 1fr auto; min-height: 100vh; } header { grid-area: head; } .side-bar { grid-area: side; position: sticky; top: 64px; height: calc(100vh - 64px); transform: none !important; border-right: 1px solid var(--border); } .content-wrapper { grid-area: main; margin-left: 0; padding: 0; min-height: calc(100vh - 64px); } footer { grid-area: foot; } .side-mask, .side-close { display: none; } }
table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: 0.95rem; line-height: 1.6; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-light); overflow: hidden; }
thead { background: var(--accent-alpha); }
th { padding: 1rem 1.25rem; text-align: left; font-weight: 600; color: var(--accent); border-bottom: 2px solid var(--border); }
td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--text-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--duration-fast) var(--ease); }
tbody tr:hover { background: var(--bg-hover); }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; border-radius: var(--radius); }
.table-wrapper table { margin: 0; }
.theme-panel { position: fixed; top: 1rem; right: 1rem; z-index: var(--z-panel); display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow-light); transition: all var(--duration-fast) var(--ease); }
.theme-panel:hover { box-shadow: var(--shadow-medium); }
#theme-cycle { color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem; border-radius: 8px; transition: all var(--duration-fast) var(--ease); cursor: pointer; }
#theme-cycle:hover { background: var(--bg-hover); transform: rotate(45deg); }
#theme-cycle svg { width: 24px; height: 24px; transition: transform var(--duration-normal) var(--ease); }
.site-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); border-top: 1px solid var(--border); padding: 1rem 1.5rem; font-size: 0.85rem; text-align: center; color: var(--text-3); line-height: 1.6; }
[data-theme="dark"] .site-footer { background: rgba(15, 23, 42, 0.8); }
.site-footer a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: all var(--duration-fast) var(--ease); }
.site-footer a:hover { color: var(--accent-hover); border-bottom-color: var(--accent); }
.site-footer a:has(img) { border-bottom: none; }
.footer-stats { margin-bottom: 0.5rem; }
body { padding-bottom: 80px; }
.theme-sepia { --bg: #faf8f3; --bg-card: #ffffff; --text: #5c4a3a; --text-2: #8b7355; --text-3: #a89176; --accent: #d4a574; --accent-hover: #c49563; --radius: 14px; }
.theme-morandi { --bg: #f5f3f0; --bg-card: #ffffff; --text: #5c5c5c; --text-2: #7a7a7a; --text-3: #999999; --accent: #b0a095; --accent-hover: #9d8d82; --radius: 16px; }
.theme-midnight { --bg: #0a0e1a; --bg-card: #151b2e; --text: #e2e8f0; --text-2: #cbd5e1; --text-3: #94a3b8; --accent: #38bdf8; --accent-hover: #0ea5e9; --radius: 10px; }
.theme-macaron { --bg: #fff5f7; --bg-card: #ffffff; --text: #ff6b81; --text-2: #ff8fa3; --text-3: #ffb3c1; --accent: #ff6b81; --accent-hover: #ff5470; --radius: 20px; }
.theme-gradient { --bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); --bg-card: rgba(255, 255, 255, 0.9); --text: #2c3e50; --text-2: #546e7a; --text-3: #78909c; --accent: #6c5ce7; --accent-hover: #5f4dd1; --radius: 14px; }
.theme-switch { --w: 52px; --h: 28px; --thumb: 22px; --gap: 3px; position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { width: var(--w); height: var(--h); background: var(--border); border-radius: calc(var(--h) / 2); transition: all var(--duration-fast) var(--ease); flex-shrink: 0; box-shadow: var(--shadow-sm); }
.slider::before { content: ""; position: absolute; left: var(--gap); top: var(--gap); width: var(--thumb); height: var(--thumb); background: var(--bg-card); border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: all var(--duration-fast) var(--ease-spring); }
.icon { position: absolute; width: 16px; height: 16px; top: 50%; transform: translateY(-50%); transition: all var(--duration-fast) var(--ease); }
.sun { left: 6px; opacity: 1; color: #fbbf24; }
.moon { right: 6px; opacity: 0; color: #60a5fa; }
input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(calc(var(--w) - var(--thumb) - 2 * var(--gap))); }
input:checked ~ .sun { opacity: 0; transform: translateY(-50%) rotate(-90deg); }
input:checked ~ .moon { opacity: 1; transform: translateY(-50%) rotate(0); }
input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.top-nav { display: flex; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.top-nav a { padding: 0.5rem 1rem; border-radius: 10px; text-decoration: none; color: var(--text-2); background: transparent; font-weight: 500; font-size: 0.95rem; transition: all var(--duration-fast) var(--ease); position: relative; }
.top-nav a::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: var(--accent); transform: translateX(-50%); transition: width var(--duration-fast) var(--ease); }
.top-nav a:hover { background: var(--bg-hover); color: var(--accent); }
.top-nav a:hover::after { width: 60%; }
@media (max-width: 1023px) { .top-nav { display: none !important; } .blog-home-page-cards { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.5rem; } .site-footer { padding: 0.75rem 1rem; font-size: 0.75rem; } .footer-stats { font-size: 0.7rem; } body { padding-bottom: 70px; } header .theme-panel { display: none; } }
@media (min-width: 1024px) { header .theme-panel { position: relative; top: auto; right: auto; margin-left: auto; display: flex; } .theme-panel-mobile { display: none; } }
@media (max-width: 640px) { .blog-home-page-card { padding: 1.5rem; } .blog-home-page-card h2 { font-size: 1.25rem; } nav { padding: 0 1rem; } .logo { font-size: 1.25rem; } }
li:has(> a[href^="/app/ssg/reader?file="]) { list-style: none; margin: .25em 0; }
li:has(> a[href^="/app/ssg/reader?file="]) > a { display: inline-flex; align-items: center; gap: .35em; padding: .2em .5em; border-radius: 4px; color: var(--text); text-decoration: none; transition: background .2s, color .2s; }
li:has(> a[href^="/app/ssg/reader?file="]) > a::before { content: ""; width: 1em; height: 1em; background: currentColor; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"/><g stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></g></svg>') no-repeat center / contain; }
li:has(> a[href^="/app/ssg/reader?file="]) > a:hover { background: var(--accent-alpha); color: var(--accent); }