:root {
/* Backgrounds */
  --bg-color: #f0f2f5;
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Subtle gradient */
  --card-bg: rgba(255,255,255,0.85); /* Semi-transparent for glass effect */
/* Colors */
  --primary-color: #3eaf7c;
  --primary-rgb: 62, 175, 124;
  --accent-color: #1793d1;
  --text-color: #2c3e50;
  --meta-color: #606266;
  --link-color: #3eaf7c;
  --link-hover-color: #42b983;
/* Borders & Shadows - Depth System */
  --border-color: rgba(0,0,0,0.05); /* Softer border */
/* Remove white border which might look like a gap on some monitors */
  --card-border: 1px solid rgba(255,255,255,0.2);
/* Layered Shadows for Realism - Reduced spread to prevent "dirty" look */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-color: rgba(0,0,0,0.05); /* Backward compat */
/* Layout */
  --card-radius: 16px; /* More rounded */
  --backdrop-filter: blur(12px) saturate(180%); /* Stronger frost effect */
  --font-base: 'LXGW WenKai Screen', 'IBM Plex Sans', 'Noto Sans SC', system-ui, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
/* Light Mode Code Block Variables (Atom One Light) */
  --code-bg: #fafafa;
  --code-text: #383a42;
  --code-gutter-color: #9ca3af;
  --code-gutter-border: #e5e7eb;
  --hl-comment: #a0a1a7;
  --hl-keyword: #a626a4;
  --hl-string: #50a14f;
  --hl-function: #4078f2;
  --hl-number: #986801;
  --hl-class: #c18401;
  --hl-tag: #e45649;
  --hl-attr: #986801;
}
[data-user-color-scheme='dark'] {
  --bg-color: #0f0f11;
  --bg-gradient: linear-gradient(135deg, #1f2229 0%, #17191f 100%);
  --card-bg: rgba(30,32,38,0.8); /* Dark glass */
  --text-color: #e0e0e0;
  --meta-color: #a0a0a0;
  --link-color: #5da9ff;
  --link-hover-color: #8bc4ff;
  --border-color: rgba(255,255,255,0.08);
  --card-border: 1px solid rgba(255,255,255,0.08);
/* Dark Mode Shadows - Glowy */
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-color: rgba(0,0,0,0.4);
/* Dark Mode Code Block Variables (Atom One Dark) */
  --code-bg: #282c34;
  --code-text: #abb2bf;
  --code-gutter-color: #636d83;
  --code-gutter-border: #3e4451;
  --hl-comment: #5c6370;
  --hl-keyword: #c678dd;
  --hl-string: #98c379;
  --hl-function: #61afef;
  --hl-number: #d19a66;
  --hl-class: #e5c07b;
  --hl-tag: #e06c75;
  --hl-attr: #d19a66;
}
html[data-user-color-scheme='dark'] {
  background-color: #0f0f11;
}
html {
  scroll-behavior: smooth;
  height: 100%;
/* Fix horizontal scrollbar issue globally */
  overflow-x: hidden;
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
body {
  margin: 0;
  font-family: var(--font-base);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient); /* Subtle gradient background */
  background-attachment: fixed; /* Parallax-like feel */
  color: var(--text-color);
  line-height: 1.8;
  min-height: 100vh;
}
a {
  text-decoration: none;
  color: var(--link-color);
  transition: all 0.2s ease;
  font-weight: 500;
}
a:hover {
  color: var(--link-hover-color);
  text-decoration: none;
}
[data-user-color-scheme='dark'] a:hover {
  color: var(--link-hover-color);
}
del {
  text-decoration: line-through;
  color: var(--meta-color);
}
.blur-text {
  color: transparent;
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  cursor: default;
}
[data-user-color-scheme='dark'] .blur-text {
  text-shadow: 0 0 5px rgba(255,255,255,0.5);
}
.blur-text:hover {
  color: var(--text-color);
  text-shadow: none;
}
.container {
  max-width: 1250px; /* Enhanced width for better content ratio */
  margin: 2rem auto;
  padding: 0 2rem;
  background: transparent;
}
.theme-transition,
.theme-transition *,
.theme-transition *:before,
.theme-transition *:after {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  transition-delay: 0s !important;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 2147483646;
}
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px; /* Better proportion, minmax prevents blowout */
  gap: 2rem !important; /* Slightly wider gap */
}
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}
.animate-up {
  animation: fadeInUp 0.5s ease-out both;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}
[data-user-color-scheme='dark'] ::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}
[data-user-color-scheme='dark'] ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
}
#nprogress .bar {
  background: var(--link-color) !important;
  height: 3px !important;
}
@-moz-keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@-webkit-keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@-o-keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.announcement-bar {
  background: var(--primary-color);
  color: #fff;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  z-index: 1001;
}
.announcement-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.announcement-content i {
  font-size: 1rem;
}
.close-announcement {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 8px;
  margin-left: 10px;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  border-radius: 4px;
}
.close-announcement:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2);
}
body > header {
  position: fixed; /* Changed from sticky to fixed for consistent overlay */
  top: 0;
  z-index: 1000;
  width: 100%;
  margin-bottom: 0;
  transition: all 0.3s ease;
}
body.other-page {
  padding-top: 120px; /* 80px + 40px announcement bar approx */
}
.navbar {
  background: var(--card-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
/* Back to comfortable height */
  height: 60px;
  padding: 0 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}
[data-user-color-scheme='dark'] .navbar {
  background: rgba(32,33,39,0.85); /* Slightly transparent dark */
}
.navbar.navbar-transparent {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none !important;
}
.navbar:not(.navbar-transparent):hover {
  background: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--backdrop-filter);
  border-bottom: 1px solid var(--border-color);
}
[data-user-color-scheme='dark'] .navbar:hover {
  background: rgba(30,32,38,0.95);
}
.navbar.navbar-transparent:hover {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.navbar-brand a {
  font-weight: 800; /* Bolder brand */
  font-size: 1.6rem;
  color: var(--text-color);
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; /* Gradient Text for Brand */
}
.navbar-menu {
  position: relative; /* For pill positioning */
  display: flex;
  align-items: center;
  gap: 4px; /* Small gap for pill separation */
  overflow: visible; /* Ensure pill can move out */
}
.navbar-item,
.navbar-link {
  position: relative;
/* Reduced padding between menu items */
  padding: 0 12px;
/* Match new navbar height */
  line-height: 60px;
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px; /* For pill shape */
  transition: color 0.2s;
  z-index: 1;
}
.navbar-item:hover,
.navbar-link:hover {
  color: var(--primary-color);
}
.navbar-item::after,
.navbar-link::after {
  display: none;
}
.navbar-menu::before {
  content: '';
  position: absolute;
/* Vertically centered pill */
  height: 36px;
  top: 50%; /* Adjusted for CSS Var top or fallback */
  border-radius: 8px;
  background: currentColor;
  opacity: 0; /* JS will toggle this */
/* Fully dynamic positioning */
  left: var(--pill-left, 0);
  top: var(--pill-top, 50%); /* Use Top var if set, else center */
  width: var(--pill-width, 0);
  height: var(--pill-height, 36px);
/* If top is 50%, translate Y */
/* But to support unified dropdown pill, we might need absolute top without translate if JS calculates it relative to menu */
/* Let's stick to the previous implementation which used top and left */
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
/* Ensure z-index is high enough to be seen inside dropdowns */
  z-index: 2000;
  color: var(--primary-color);
}
.navbar-menu.pill-visible::before {
  opacity: 0.1;
}
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
/* Connect to bottom of navbar */
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(10px); /* Centered relative to parent */
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
/* Tighter width */
  min-width: 120px;
  width: max-content;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 6px; /* Inner padding for floating items */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow: visible;
}
[data-user-color-scheme='dark'] .dropdown-menu {
  background: rgba(30,32,38,0.95);
  border-color: rgba(255,255,255,0.1);
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9rem;
  white-space: nowrap;
  border-radius: 6px;
  text-align: center; /* Center align for better look in small dropdown */
  z-index: 2005;
}
.dropdown-item:hover {
  background: rgba(var(--primary-rgb), 0.1); /* Fallback if pill fails */
  color: var(--primary-color);
}
.navbar-link i {
  font-size: 0.8em;
  margin-left: 4px;
  transition: transform 0.3s;
}
.dropdown:hover .navbar-link i {
  transform: rotate(180deg);
}
.navbar-center-title {
  flex-grow: 1; /* Take up available space */
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth fade */
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
/* text-overflow: ellipsis;  - Managed by inner elements now */
  transform: translateY(10px);
  color: var(--text-color);
  margin: 0 1rem; /* Spacing */
  max-width: 50%; /* Prevent eating up menu space */
  position: relative; /* Context for absolute positioning of hover text */
  height: 60px; /* Match navbar height */
  line-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.title-text-default,
.title-text-hover {
  position: absolute;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.title-text-default {
  opacity: 1;
  transform: translateY(0);
}
.title-text-hover {
  opacity: 0;
  transform: translateY(15px);
  color: var(--primary-color);
}
.navbar-center-title:hover .title-text-default {
  opacity: 0;
  transform: translateY(-15px);
}
.navbar-center-title:hover .title-text-hover {
  opacity: 1;
  transform: translateY(0);
}
.navbar.show-title .navbar-center-title {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .navbar-center-title {
    display: none; /* Keep hidden on mobile */
  }
}
.sidebar-column {
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
/* Smart Sticky with Internal Scroll */
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: visible;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}
.sidebar-column::-webkit-scrollbar {
  display: none;
}
.sidebar-card {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-filter);
  -webkit-backdrop-filter: var(--backdrop-filter);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 0; /* Remove default padding for cover image support */
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Clip corners */
/* Fix hardware acceleration rendering artifacts (black blocks) */
  backface-visibility: hidden;
  transform: translateZ(0);
}
.sidebar-card:hover {
  transform: translateY(-4px) translateZ(0);
}
.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color);
}
.card-header i {
  color: var(--primary-color);
}
.sidebar-title {
  margin: 0; /* Override old style */
  border: none;
  padding: 0;
}
.profile-background {
  height: 100px;
  background: linear-gradient(120deg, var(--primary-color), #a18cd1, #fbc2eb);
  width: 100%;
}
.profile-header {
  text-align: center;
  margin-top: -50px; /* Pull avatar up */
  padding: 0 20px;
}
.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--card-bg); /* Ring effect */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background: var(--card-bg);
  transition: transform 0.5s;
}
.profile-avatar:hover {
  transform: rotate(360deg);
}
.profile-info {
  text-align: center;
  padding: 15px 20px 25px;
}
.author-name {
  margin: 10px 0 5px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
}
.author-bio {
  font-size: 0.9rem;
  color: var(--meta-color);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.site-data {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
  padding: 0 10px;
}
.site-data a {
  text-decoration: none;
  flex: 1;
}
.data-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
}
.data-item:hover {
  transform: scale(1.1);
}
.data-count {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}
.data-name {
  font-size: 0.8rem;
  color: var(--meta-color);
  margin-top: 2px;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(127,127,127,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.3s;
  font-size: 1.1rem;
}
[data-user-color-scheme='dark'] .social-icon {
  background: rgba(255,255,255,0.1);
}
.social-icon:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(62,175,124,0.4);
}
.sidebar-category-list {
  list-style: none;
  padding: 10px 20px 20px;
  margin: 0;
}
.sidebar-category-list-item {
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color);
}
.sidebar-category-list-item:last-child {
  border-bottom: none;
}
.sidebar-category-list-link {
  color: var(--text-color);
  transition: color 0.2s;
  font-size: 0.95rem;
}
.sidebar-category-list-link:hover {
  color: var(--primary-color);
  padding-left: 5px; /* Slight move effect */
}
.sidebar-category-list-count {
  background: rgba(127,127,127,0.1);
  color: var(--meta-color);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
}
.sidebar-tags {
  padding: 15px 20px 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sidebar-tags a {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(127,127,127,0.1);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s;
}
.sidebar-tags a:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.05);
}
.sidebar,
.sidebar-column,
aside.sidebar-column {
  background: transparent !important;
  background-color: transparent !important;
  padding: 0;
  margin: 0;
  border: none !important;
  box-shadow: none !important;
}
.sidebar::before,
.sidebar::after,
.sidebar-column::before,
.sidebar-column::after {
  display: none !important;
  content: none !important;
}
aside {
  background: transparent;
}
.hero-section {
  position: relative;
  text-align: center;
/* Occupy exactly full viewport height */
  height: 100vh;
  width: 100%;
/* Flex layout for centering */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
/* Use padding to push content down from under the transparent fixed header */
  padding: 80px 20px 0;
  overflow: hidden;
  margin: 0;
}
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.decoration-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px); /* Soft glow effect */
  opacity: 0.15;
  animation: floatShape 20s infinite alternate;
}
[data-user-color-scheme='dark'] .decoration-circle {
  opacity: 0.25;
}
.circle-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}
.circle-2 {
  width: 300px;
  height: 300px;
  background: #647eff;
  bottom: 10%;
  right: -5%;
  animation-delay: -5s;
}
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
/* Adjust max-width to ensure it fits mobile */
  max-width: 90%;
}
.hero-pre-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--meta-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0.5rem 0 1.5rem;
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.highlight-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #647eff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-color);
  font-weight: 400;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.motto-swap {
  display: inline-grid;
  grid-template-areas: "stack";
  place-items: center;
  cursor: pointer;
}
.motto-swap .motto-default,
.motto-swap .motto-hover {
  grid-area: stack;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  backface-visibility: hidden;
}
.motto-swap .motto-default {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.motto-swap .motto-hover {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  filter: blur(4px);
/* Gradient Text Style */
  background: -webkit-linear-gradient(315deg, #42d392 25%, #647eff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* Fallback */
}
.motto-swap:hover .motto-default {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  filter: blur(4px);
}
.motto-swap:hover .motto-hover {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.scroll-down-indicator {
  position: absolute;
  bottom: 30px;
  font-size: 1.5rem;
  color: var(--meta-color);
  cursor: pointer;
  animation: bounce 2s infinite;
  z-index: 10;
  transition: color 0.3s;
}
.scroll-down-indicator:hover {
  color: var(--primary-color);
}
.post-card {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-filter);
  -webkit-backdrop-filter: var(--backdrop-filter);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
}
.post-card:hover::before {
  opacity: 1;
}
.post-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}
.post-title a {
  color: var(--text-color);
}
.post-meta {
  color: var(--meta-color);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.post-container .post-content {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-filter);
  -webkit-backdrop-filter: var(--backdrop-filter);
  border: var(--card-border);
  padding: 3rem;
  border-radius: var(--card-radius);
}
.post-content img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin: 1rem 0;
}
.read-more {
  display: inline-block;
  padding: 8px 20px;
  margin-top: 15px;
  background: var(--link-color);
  color: #fff !important;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  background: var(--link-hover-color);
}
.post-body h1 {
  font-size: 2rem;
  text-align: center;
  border-bottom: 1px dashed var(--link-color);
  padding-bottom: 1rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-weight: bold;
}
.post-body h2 {
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1.6;
  border-bottom: 1px dashed var(--link-color); /* Light primary dashed */
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
.post-body h3 {
  width: fit-content;
  font-size: 1.3rem;
  font-weight: bold;
  position: relative;
  z-index: 0;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding-left: 0; /* Reset previous */
  border-left: none; /* Reset previous */
}
.post-body h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 8px;
  border-radius: 3px;
  background-color: var(--link-color);
  opacity: 0.2;
  z-index: -1;
}
.post-header-curve {
  margin-bottom: 3rem;
  text-align: center;
  padding: 0 1rem;
}
.post-meta-top {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.meta-list {
  display: flex;
  gap: 0.5rem;
}
.meta-tag-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.05);
  color: var(--meta-color);
  text-decoration: none;
  transition: all 0.3s ease;
}
[data-user-color-scheme='dark'] .meta-tag-item {
  background: rgba(255,255,255,0.08);
  color: var(--text-color);
}
.meta-tag-item:hover {
  color: #fff;
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}
.meta-tag-item i {
  margin-right: 5px;
  font-size: 0.8em;
}
.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0.5rem 0 1.5rem 0;
  color: var(--text-color);
  line-height: 1.3;
}
.post-meta-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  color: var(--meta-color);
  font-size: 0.9rem;
  opacity: 0.8;
  flex-wrap: wrap;
}
.post-meta-bottom .meta-item {
  display: flex;
  align-items: center;
}
.post-meta-bottom .meta-item i {
  margin-right: 6px;
  color: var(--primary-color);
}
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
  scroll-margin-top: 80px;
}
.toc-card {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow: hidden; /* Hide overflow for card radius */
  padding: 0 !important; /* Reset padding, inner container handles it */
}
.toc-card .sidebar-title {
  padding: 18px;
  margin: 0;
  height: 58px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.1em;
  border-bottom: 1px solid transparent; /* Optional separator */
}
.toc-content {
  position: relative;
/* Curve Theme Exact Reference: padding 20px, left 24px for track */
  padding: 10px 10px 10px 24px;
  overflow-y: auto;
  max-height: calc(70vh - 58px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.toc-content::-webkit-scrollbar {
  display: none;
}
.toc-content::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 20px;
  bottom: 20px;
  width: 4px;
  background-color: var(--border-color); /* Matches var(--main-card-border) */
  border-radius: 4px;
  opacity: 0.6;
}
.toc-marker {
  position: absolute;
  left: 12px;
  width: 4px;
  height: 20px; /* Curve uses 20px */
  background-color: var(--primary-color);
  border-radius: 8px; /* Curve uses 8px radius */
  transition: top 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.2s;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
}
.toc {
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.6;
}
.toc-item {
  list-style: none;
  margin: 5px 0;
}
.toc-link {
  display: block;
/* Curve Reference: padding 6px 12px, margin 4px 0 */
  padding: 6px 12px;
  margin: 4px 0;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.6;
  transition: all 0.3s;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}
.toc-link:hover {
  color: var(--primary-color);
  background-color: transparent; /* custom override */
  opacity: 1;
  padding-left: 15px; /* Slight shift */
}
.toc-link.active {
  color: var(--primary-color);
  background-color: transparent; /* No background highlight, only slider */
  opacity: 1;
  font-weight: 600;
}
.toc-child {
  padding-left: 0; /* Reset default OL padding */
  list-style: none;
  margin-top: 5px;
}
.toc-child .toc-link {
  margin-left: 14px;
  font-size: 0.9rem;
}
.toc-child .toc-child .toc-link {
  margin-left: 28px;
}
.active .toc-marker {
  opacity: 1;
}
.post-comments-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  margin-top: 1.5rem;
}
.comment-loading {
  text-align: center;
  padding: 2rem;
  color: var(--meta-color);
  font-size: 0.9rem;
}
.comment-loading i {
  margin-right: 8px;
  animation: spin 1s linear infinite;
}
@media (max-width: 768px) {
  .post-container .post-content {
    padding: 1.5rem;
  }
  .post-card {
    padding: 1.5rem;
  }
}
@-moz-keyframes floatShape {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}
@-webkit-keyframes floatShape {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}
@-o-keyframes floatShape {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}
@keyframes floatShape {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}
@-moz-keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
@-webkit-keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
@-o-keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
@-moz-keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
@-o-keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
.hero-btn-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 10px;
}
.hero-btn {
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  outline: none;
}
.primary-btn {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}
.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.5);
  color: #fff;
}
.secondary-btn {
  background: rgba(127,127,127,0.1);
  color: var(--text-color);
  border-color: var(--border-color);
}
.secondary-btn:hover {
  background: var(--card-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}
.tool-island {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 15px; /* More spacing */
  z-index: 999;
}
.tool-item {
  width: 50px; /* Larger buttons */
  height: 50px;
  background: var(--card-bg); /* Glass effect */
  backdrop-filter: var(--backdrop-filter);
  -webkit-backdrop-filter: var(--backdrop-filter);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy spring */
  font-size: 1.3rem; /* Larger icon */
  color: var(--text-color);
}
.mode-toggle i {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-item:hover,
.tool-item.is-active {
  transform: translateY(-5px) scale(1.1); /* Lift & Scale */
  color: var(--primary-color);
  background: var(--bg-color);
}
.back-to-top {
  position: relative;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s;
}
.back-to-top:hover i {
  opacity: 1;
}
.back-to-top:hover .percent-text {
  opacity: 0;
}
.back-to-top.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
}
.progress-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-90deg);
}
.progress-ring__circle {
  stroke-dasharray: 138.2;
  stroke-dashoffset: 138.2;
  transition: stroke-dashoffset 0.1s linear;
}
.back-to-top .percent-text {
  position: absolute;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s;
  color: var(--primary-color);
}
.back-to-top:hover .percent-text {
  opacity: 1;
}
.back-to-top:hover i {
  opacity: 0;
}
.back-to-top i {
  transition: opacity 0.2s;
}
.ai-abstract-box {
  background: rgba(240,247,255,0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(204,229,255,0.5);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
[data-user-color-scheme='dark'] .ai-abstract-box {
  background: rgba(42,53,68,0.6);
  border-color: rgba(59,77,97,0.5);
}
.ai-title {
  font-weight: bold;
  color: #004085;
  margin-bottom: 0.5rem;
}
[data-user-color-scheme='dark'] .ai-title {
  color: #8bc4ff;
}
.ai-text {
  font-size: 0.95rem;
  color: #004085;
}
[data-user-color-scheme='dark'] .ai-text {
  color: #ccc;
}
.label {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500; /* Lighter weight */
  color: var(--text-color); /* Usually dark text on light bg in Stellar */
  background: var(--bg-color); /* Default fallback */
  vertical-align: middle;
  margin: 0 4px;
  line-height: 1.8; /* Height from line-height */
  box-shadow: none; /* Stellar is flat */
  transition: all 0.2s ease;
  opacity: 0.8;
}
.label:hover {
  opacity: 1;
  background: var(--card-bg);
}
.label-default {
  background-color: #f1f2f3;
  color: #555;
}
.label-primary {
  background-color: rgba(var(--primary-rgb), 0.15);
  color: var(--primary-color);
}
.label-success {
  background-color: rgba(62,175,124,0.15);
  color: #3eaf7c;
}
.label-info {
  background-color: rgba(23,147,209,0.15);
  color: #1793d1;
}
.label-warning {
  background-color: rgba(255,193,7,0.15);
  color: #d4a017;
}
.label-danger {
  background-color: rgba(231,76,60,0.15);
  color: #c0392b;
}
.label-tip {
  background-color: rgba(0,184,148,0.15);
  color: #00b894;
}
[data-user-color-scheme='dark'] .label-default {
  background-color: #333;
  color: #aaa;
}
.label-tip {
  background-color: #48c9b0;
}
[data-user-color-scheme='dark'] .label {
  opacity: 0.9;
  box-shadow: none; /* remove shadow in dark mode for cleaner look */
}
[data-user-color-scheme='dark'] .label-default {
  background-color: #626567;
}
mark.tag-mark {
  background: transparent;
  border-bottom: 2px solid var(--primary-color);
  color: inherit;
  font-weight: 500;
  padding: 0 2px;
  border-radius: 0;
  transition: all 0.2s ease;
}
mark.tag-mark:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 4px;
  text-decoration: none;
}
[data-user-color-scheme='dark'] mark.tag-mark {
  border-bottom-color: var(--primary-color);
}
.blur-text {
  filter: blur(8px);
  transition: filter 0.3s ease, background 0.3s;
  background: rgba(128,128,128,0.1);
  border-radius: 4px;
  padding: 0 4px;
  user-select: none;
  cursor: pointer;
  color: transparent;
}
.blur-text:hover {
  filter: blur(0);
  background: transparent;
  color: inherit;
  user-select: auto;
}
.tag-image {
  margin: 1rem auto;
  text-align: center;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--card-bg);
}
.tag-image img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--card-radius);
}
.tag-link {
  margin: 1rem 0;
}
.link-card {
  display: flex;
  padding: 12px;
  border-radius: 12px; /* Stellar uses slightly tighter radius for internal items */
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease-in-out;
  text-decoration: none !important;
  align-items: center;
}
.link-card:hover {
  background: var(--bg-color);
  transform: translateY(-2px); /* Subtle lift */
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.3);
}
.link-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
}
.link-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 0; /* Icons often don't need rounding if container has it */
}
.link-info {
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.link-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-url {
  font-size: 0.8rem;
  color: var(--meta-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}
.tag-quot {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--bg-color); /* Slightly darker/different from card */
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  color: var(--text-color);
  font-size: 1.05rem;
}
.tag-quot i {
  color: var(--primary-color);
  opacity: 0.5;
  margin-right: 0.5rem;
}
.note {
  position: relative;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: var(--bg-color);
  border: none; /* No border, just background */
  font-size: 0.95rem;
  line-height: 1.6;
}
.note-default {
  background: #f1f2f3;
  color: #444;
}
.note-primary {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
}
.note-info {
  background: rgba(23,147,209,0.1);
  color: #1793d1;
}
.note-success {
  background: rgba(62,175,124,0.1);
  color: #3eaf7c;
}
.note-warning {
  background: rgba(255,193,7,0.12);
  color: #d4a017;
}
.note-danger {
  background: rgba(231,76,60,0.1);
  color: #c0392b;
}
.note-tip {
  background: rgba(0,184,148,0.1);
  color: #00b894;
}
[data-user-color-scheme='dark'] .note-default {
  background: rgba(255,255,255,0.1);
  color: #ccc;
}
.note strong {
  font-weight: 700;
  display: block; /* Title on own line if intended, or inline */
  margin-bottom: 0.25rem;
}
.tabs-component {
  margin: 1.5rem 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.nav-tabs {
  display: flex;
  overflow-x: auto;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1rem;
  gap: 1rem;
}
[data-user-color-scheme='dark'] .nav-tabs {
  background: rgba(255,255,255,0.02);
}
.tab-item {
  padding: 0.75rem 0; /* Top/Bottom only, gap provides space */
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--meta-color);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
}
.tab-item:hover {
  color: var(--primary-color);
}
.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}
.tab-content {
  padding: 1.5rem;
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s; /* Just simple fade */
}
.poetry-container {
  text-align: center;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--card-radius);
/* box-shadow: var(--shadow-sm); */
/* Flat or subtle shadow */
}
.poetry-header {
  margin-bottom: 1.5rem;
}
.poetry-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.poetry-meta {
  font-size: 0.85rem;
  color: var(--meta-color);
  opacity: 0.8;
}
.poetry-content {
  font-family: serif; /* Keep serif for poetry */
  font-size: 1.1rem;
  line-height: 2;
}
.paper-container {
  padding: 2rem;
  margin: 2rem 0;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.paper-header h2 {
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.paper-content {
  font-size: 1rem;
  line-height: 1.8;
}
.paper-footer {
  margin-top: 2rem;
  text-align: right;
  font-size: 0.9rem;
  color: var(--meta-color);
}
.friends-container {
  max-width: 100%;
  margin: 0 auto;
}
.friends-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; /* Stellar-like compact gap */
}
.friend-card {
  position: relative;
  background: var(--card-bg, #fff);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.28s ease;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  text-decoration: none !important; /* Ensure card link has no underline */
  overflow: hidden;
  border: var(--card-border);
}
.friend-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  z-index: 2;
}
.friend-card a {
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
}
.friend-left {
  flex-shrink: 0;
  margin-right: 12px;
}
.friend-avatar-wrapper {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 6px; /* Stellar 'squircle' often used, or 4px */
}
.friend-avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  background: #f9f9f9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s;
}
.friend-card:hover .friend-avatar-wrapper img {
  filter: brightness(0.95);
}
.friend-right {
  flex: 1;
  min-width: 0; /* Enable flex truncate */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
}
.friend-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.friend-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color, #333);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  transition: color 0.2s;
}
.friend-card:hover .friend-name {
  color: var(--primary-color, #333);
}
.friend-desc {
  font-size: 0.8125rem; /* ~13px */
  color: var(--meta-color, #888);
  line-height: 1.4;
  height: 2.8em; /* 2 lines exactly */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}
.friend-rss {
  color: #ddd;
  font-size: 0.85rem;
  margin-left: 6px;
  transition: all 0.2s;
}
.friend-rss:hover {
  color: #ff9800;
  transform: scale(1.1);
}
.friend-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.friend-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  opacity: 0.9;
}
.friend-card.layout-stellar {
  display: grid !important;
  grid-template-columns: 240px 1fr; /* Fixed left width */
  gap: 0;
  background: var(--card-bg, #fff);
  border-radius: 4px; /* standard stellar radius */
  padding: 0; /* Reset */
  align-items: stretch;
  border: 1px solid transparent;
  transition: all 0.28s ease;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
  grid-column: 1/-1; /* Force full width in any grid container */
  overflow: hidden;
}
.friend-card.layout-stellar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0,0,0,0.1);
  z-index: 1;
}
@media (max-width: 768px) {
  .friend-card.layout-stellar {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }
}
.stellar-friend-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: #f9f9f9; /* Contrast bg */
  border-right: 1px solid rgba(0,0,0,0.03);
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .stellar-friend-left {
    background: rgba(255,255,255,0.02);
  }
}
.stellar-friend-left .card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color, #333);
  text-decoration: none !important;
}
.stellar-friend-left .avatar-box img {
  width: 64px;
  height: 64px;
  border-radius: 64px; /* Circle */
  object-fit: cover;
  margin-bottom: 8px;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.4s ease;
}
.stellar-friend-left .card-link:hover .avatar-box img {
  transform: rotate(360deg);
}
.info-box {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stellar-friend-left .friend-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}
.stellar-friend-left .friend-rss {
  margin: 0; /* reset */
  font-size: 0.8rem;
}
.stellar-friend-left .friend-tags {
  justify-content: center;
  margin-top: 12px;
  gap: 4px;
}
.stellar-friend-left .friend-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}
.stellar-friend-right {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  min-width: 0;
}
.friend-desc.expanded {
  font-size: 0.95rem;
  color: #888;
  line-height: 1.5;
  margin-bottom: 16px;
  position: relative;
  padding-left: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.friend-posts-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto; /* Push to bottom if height varies */
}
.friend-post-item-stellar {
  display: flex;
  align-items: center; /* Align Icon/Text */
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.2s;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.friend-post-item-stellar:hover {
  background: rgba(0,0,0,0.02);
}
.friend-post-item-stellar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 12px;
  width: 3px;
  border-radius: 2px;
  background: #ddd;
  transition: all 0.2s;
}
.friend-post-item-stellar:hover::before {
  background: var(--primary-color, #2196f3);
  height: 60%;
}
.friend-post-item-stellar .friend-post-title {
  font-size: 0.95rem;
  color: var(--text-color, #444);
  font-weight: 400;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 8px;
}
.friend-post-item-stellar:hover .friend-post-title {
  color: var(--primary-color, #2196f3);
}
.friend-post-item-stellar .friend-post-date {
  font-size: 12px;
  color: #ccc;
  margin-left: 12px;
  font-family: monospace;
}
.friends-posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.friend-post-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.friend-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.friend-post-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
  backdrop-filter: blur(5px);
/* Animation States */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-modal.show {
  opacity: 1;
  visibility: visible;
}
.search-content {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-filter);
  -webkit-backdrop-filter: var(--backdrop-filter);
  width: 600px;
  max-width: 90%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
/* Content Animation */
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: zoomIn 0.3s ease;
}
.search-modal.show .search-content {
  transform: translateY(0) scale(1);
}
.search-header {
  background: transparent; /* Seamless header */
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(127,127,127,0.1);
}
.search-title {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-color);
}
.search-input-wrapper {
  padding: 20px;
}
#local-search-input {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(127,127,127,0.05);
  color: var(--text-color);
  transition: all 0.3s;
}
#local-search-input:focus {
  outline: none;
  background: var(--bg-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
#local-search-result {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px; /* Fixed padded issue */
}
.search-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.search-result-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}
.search-result-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--link-color);
  display: block;
  margin-bottom: 5px;
}
.search-result-content {
  font-size: 0.9rem;
  color: var(--meta-color);
  max-height: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-keyword {
  color: #c0392b;
  font-weight: bold;
}
footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--meta-color);
  background: var(--card-bg); /* Optional footer background */
  backdrop-filter: var(--backdrop-filter);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
.footer-custom-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-custom-content a {
  color: var(--text-color);
  border-bottom: 1px dashed var(--meta-color);
}
.footer-custom-content a:hover {
  color: var(--primary-color);
  border-bottom-style: solid;
}
.copyright,
.runtime-info,
.statistics-info {
  opacity: 0.8;
}
.travellings-badge {
  margin: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px; /* Space between badges */
  flex-wrap: wrap;
}
.travellings-badge a {
  display: inline-block; /* Ensure transform works */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-bottom: none !important; /* Remove underline for images */
}
.travellings-badge a:hover {
  transform: translateY(-5px) scale(1.1); /* Independent hover effect */
  border-bottom: none !important;
}
.license-info {
  font-size: 0.8rem;
  opacity: 0.6;
  max-width: 600px;
  margin: 0 auto;
}
.separator {
  margin: 0 5px;
  opacity: 0.5;
}
input,
textarea {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
[data-user-color-scheme='dark'] input,
[data-user-color-scheme='dark'] textarea {
  background: rgba(255,255,255,0.05);
  border-color: #444;
}
@-moz-keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@-webkit-keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@-o-keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
figure.highlight {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 10px 0; /* Updated for proper internal table padding */
  margin: 20px 0;
  overflow: hidden; /* Changed from auto to hold the copy button */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  position: relative;
  transition: background-color 0.3s ease;
}
figure.highlight table {
  display: block;
  overflow: auto;
  max-height: 60vh;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
}
figure.highlight::before {
  content: ' ';
  display: block;
  background: #fc625d;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  margin-bottom: 15px;
  margin-left: 20px; /* Offset to match previous visual style */
  opacity: 0.8;
}
figure.highlight .gutter {
  color: var(--code-gutter-color);
  padding: 0 15px 0 20px; /* 内部左侧内距 */
  border-right: 1px solid var(--code-gutter-border);
  text-align: right;
  user-select: none;
  position: sticky;
  left: 0;
  background: var(--code-bg); /* Prevents text from showing under transparent sticky element */
  z-index: 10;
  transform: translateZ(0); /* Subpixel anti-jitter */
  will-change: transform;
}
figure.highlight .code {
  padding-left: 15px;
}
figure.highlight pre {
  margin: 0;
  font-family: var(--font-code);
  font-size: 0.95rem;
  color: var(--code-text);
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
}
.copy-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--code-gutter-color);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  font-family: var(--font-code);
  font-size: 0.75rem;
  opacity: 0;
}
figure.highlight:hover .copy-btn {
  opacity: 1;
}
.copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--link-hover-color);
}
.copy-btn.copied {
  color: #3eaf7c;
}
.hljs-comment,
.hljs-quote {
  color: var(--hl-comment);
  font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-operator,
.hljs-doctag {
  color: var(--hl-keyword);
}
.hljs-string,
.hljs-regexp,
.hljs-meta-string {
  color: var(--hl-string);
}
.hljs-title,
.hljs-section,
.hljs-selector-id,
.hljs-function,
.hljs-title.function_ {
  color: var(--hl-function);
}
.hljs-variable,
.hljs-template-variable,
.hljs-attr,
.hljs-property {
  color: var(--hl-tag);
}
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-class,
.hljs-title.class_ {
  color: var(--hl-class);
}
.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
  color: var(--hl-number);
}
.hljs-tag,
.hljs-name,
.hljs-selector-class {
  color: var(--hl-tag);
}
.hljs-attribute {
  color: var(--hl-attr);
}
.hljs-meta {
  color: var(--hl-function);
}
.hljs-punctuation {
  color: var(--code-text);
}
.hljs-strong {
  font-weight: bold;
}
code {
  background: rgba(0,0,0,0.05);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  color: #c7254e;
}
[data-user-color-scheme='dark'] code {
  background: rgba(255,255,255,0.1);
  color: #ff6b6b;
}
figure.highlight code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
}
[data-user-color-scheme='dark'] figure.highlight {
  box-shadow: none; /* Remove shadow to avoid "frame" look in dark mode */
}
.archive-container {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding-top: 2rem;
}
.post-header-curve {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  padding: 3rem 0;
  animation: fadeInDown 0.6s ease;
}
.post-header-curve .post-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}
.post-header-curve::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 1.5rem auto 0;
  border-radius: 4px;
  opacity: 0.6;
}
.post-meta-bottom {
  margin-top: 1rem;
  color: var(--meta-color);
  font-size: 0.95rem;
  font-family: inherit;
}
.archive-timeline {
  position: relative;
  padding-left: 20px;
  margin-left: 10px;
}
.archive-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 20px;
  bottom: 0;
  width: 0;
  border-left: 2px dashed rgba(var(--primary-rgb), 0.3);
  z-index: 0;
}
.timeline-year {
  position: relative;
  padding-left: 40px;
  margin: 4rem 0 2rem;
  animation: fadeIn 0.6s ease;
}
.timeline-year h2 {
  font-size: 2rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px var(--meta-color); /* Hollow text effect */
  margin: 0;
  line-height: 1;
  opacity: 0.6;
  display: inline-block;
  position: relative;
  transition: all 0.3s;
}
.timeline-year:hover h2 {
  color: var(--primary-color);
  -webkit-text-stroke: 0;
  opacity: 1;
}
.timeline-year::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 0 4px var(--card-bg); /* Mask dashed line */
  z-index: 1;
}
.timeline-item {
  position: relative;
  padding-left: 40px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
  animation: fadeIn 0.6s ease;
  animation-fill-mode: both;
}
.timeline-item:hover {
  transform: translateX(5px);
}
.timeline-marker {
  position: absolute;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--meta-color);
  transition: all 0.3s;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-color); /* Mask dashed line */
}
.timeline-item:hover .timeline-marker {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.4);
  box-shadow: 0 0 0 4px var(--bg-color), 0 0 10px rgba(var(--primary-rgb), 0.5);
}
.timeline-content {
  display: flex;
  align-items: baseline;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  transition: all 0.3s;
  border: 1px solid transparent;
}
.timeline-item:hover .timeline-content {
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-color: rgba(var(--primary-rgb), 0.1);
}
.timeline-date {
  font-family: 'Consolas', 'Monaco', monospace;
  color: var(--meta-color);
  font-size: 0.85rem;
  margin-right: 1.5rem;
  white-space: nowrap;
  opacity: 0.8;
}
.timeline-title {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.2s;
}
.timeline-item:hover .timeline-title {
  color: var(--primary-color);
}
@media (max-width: 600px) {
  .timeline-content {
    flex-direction: column;
    padding: 10px;
  }
  .timeline-date {
    margin-bottom: 4px;
    font-size: 0.8rem;
  }
}
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 2rem 0;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.08); /* Subtle border */
  border-radius: 8px; /* Soft roundness, not pill */
  text-decoration: none;
  transition: all 0.2s ease;
  color: var(--text-color);
  font-size: 0.95rem;
}
.tag-chip:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}
[data-user-color-scheme='dark'] .tag-chip {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
[data-user-color-scheme='dark'] .tag-chip:hover {
  background: var(--primary-color);
  color: #fff;
}
.tag-name {
  font-weight: 500;
  margin-right: 8px;
}
.tag-count {
  font-size: 0.75rem;
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--meta-color);
  transition: all 0.2s;
}
[data-user-color-scheme='dark'] .tag-count {
  background: rgba(255,255,255,0.15);
  color: #ccc;
}
.tag-chip:hover .tag-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.tag-container {
  max-width: 900px;
  margin: 2rem auto;
}
.simple-card {
  padding: 1.5rem 2rem !important; /* Override post-card padding */
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid transparent; /* For hover effect */
}
.simple-card:hover {
  border-left-color: var(--primary-color);
}
.simple-card .post-content-wrapper {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.simple-card .post-title {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
  flex: 1;
}
.simple-card .post-meta {
  margin: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: 20px;
}
@media (max-width: 600px) {
  .simple-card .post-content-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  .simple-card .post-meta {
    margin-left: 0;
    margin-top: 8px;
  }
}
.categories-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  padding: 2rem 0;
}
.category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--backdrop-filter);
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
  opacity: 0.8;
}
.category-card:hover {
  transform: translateY(-6px);
}
.category-card:hover::before {
  transform: scaleY(1);
}
.cat-name {
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}
.cat-name i {
  font-size: 1.3rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}
.category-card:hover .cat-name i {
  transform: scale(1.1) rotate(-5deg);
}
.cat-count {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 24px;
  transition: all 0.3s ease;
  z-index: 1;
}
.category-card:hover .cat-count {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}
@media (max-width: 600px) {
  .categories-cloud {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.ai-modal {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 70vh;
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-filter);
  border: var(--card-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2000;
  box-shadow: var(--shadow-md);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(20px);
}
.ai-modal.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}
.ai-header {
  padding: 18px 20px;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.ai-header:active {
  cursor: grabbing;
}
.ai-controls {
  display: flex;
  gap: 12px;
}
.ai-controls span {
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.ai-controls span:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}
.ai-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(62,175,124,0.02); /* 手动指定颜色以兼容 Stylus 对 var() 的限制 */
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scroll-behavior: smooth;
}
.ai-messages::-webkit-scrollbar {
  width: 5px;
}
.ai-messages::-webkit-scrollbar-track {
  background: transparent;
}
.ai-messages::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}
.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
  animation: message-in 0.3s ease-out;
}
.user-message {
  align-self: flex-end;
  background: var(--primary-color);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(62,175,124,0.2); /* 手动指定颜色以兼容 Stylus */
}
.ai-message {
  align-self: flex-start;
  background: #fff;
  color: var(--text-color);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
[data-user-color-scheme='dark'] .ai-message {
  background: #2a2a2a;
  color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ai-input-area {
  padding: 15px 20px;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  align-items: center;
}
.ai-input-area input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  outline: none;
  background: rgba(0,0,0,0.03);
  color: var(--text-color);
  transition: all 0.2s;
  font-family: inherit;
}
.ai-input-area input:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(62,175,124,0.1);
}
[data-user-color-scheme='dark'] .ai-input-area input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
[data-user-color-scheme='dark'] .ai-input-area input:focus {
  background: #1a1a1a;
  color: #e0e0e0;
  border-color: var(--primary-color);
}
.ai-input-area button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.ai-input-area button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(62,175,124,0.3);
}
.ai-input-area button:active {
  transform: translateY(0);
}
#ai-thinking {
  padding: 10px 15px;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--meta-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
#ai-thinking::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}
.ai-message p {
  margin-bottom: 8px;
}
.ai-message p:last-child {
  margin-bottom: 0;
}
.ai-message code {
  background: rgba(0,0,0,0.08);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.9em;
}
@-moz-keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@-webkit-keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@-o-keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@-moz-keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
@-webkit-keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
@-o-keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
