/**
 * 狗子博客 - 紫罗兰主题配色
 * Design by 狗子 AI 设计大师
 * 适配紫色 Logo 色调
 */
:root {
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
  --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-display: 'Noto Serif SC', serif;
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
}
:root {
  --primary: #8b7bb8;
  --primary-70: rgba(139, 123, 184, 0.7);
  --primary-50: rgba(139, 123, 184, 0.5);
  --primary-30: rgba(139, 123, 184, 0.3);
  --primary-20: rgba(139, 123, 184, 0.2);
  --primary-weak: #a99bc9;
  --primary-weak-50: rgba(169, 155, 201, 0.5);
  --body-bg-color: #f8f6fa;
  --theme-bg-color: #fefefe;
  --theme-bg2-color: #f0ecf5;
  --body-color: #4a4a52;
  --body-color-light: #6b6b75;
  --heading-color: #3d3d45;
  --accent-warm: #e8a5a5;
  --accent-cool: #9bb8d4;
  --accent-gold: #d4b896;
  --accent-rose: #d4a5c4;
  --shadow-sm: 0 1px 3px rgba(139, 123, 184, 0.08);
  --shadow-md: 0 4px 12px rgba(139, 123, 184, 0.12);
  --shadow-lg: 0 8px 24px rgba(139, 123, 184, 0.15);
  --shadow-hover: 0 12px 32px rgba(139, 123, 184, 0.2);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}
body {
  font-family: var(--font-sans);
  font-weight: var(--font-regular);
  line-height: 1.8;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--body-bg-color) 0%, #f5f2f8 100%);
  background-attachment: fixed;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: var(--font-semibold);
  color: var(--heading-color);
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.trm-banner-title {
  font-family: var(--font-serif);
  font-weight: var(--font-bold);
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  text-shadow: 2px 2px 4px rgba(139, 123, 184, 0.15);
}
@media (max-width: 768px) {
  .trm-banner-title {
    font-size: 2rem;
  }
}
.trm-banner-text {
  font-family: var(--font-sans);
  font-weight: var(--font-light);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  opacity: 0.9;
}
.trm-card {
  background: var(--theme-bg-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(139, 123, 184, 0.08);
  overflow: hidden;
}
.trm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.trm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-rose), var(--primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.trm-card:hover::before {
  opacity: 1;
}
.trm-post-card {
  position: relative;
}
.trm-post-card .trm-post-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: var(--font-semibold);
  line-height: 1.5;
  color: var(--heading-color);
  margin-bottom: 12px;
}
.trm-post-card .trm-post-title:hover {
  color: var(--primary);
}
.trm-post-card .trm-post-desc {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--body-color-light);
  line-height: 1.7;
}
.trm-top-bar {
  background: rgba(254, 254, 254, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 123, 184, 0.08);
  box-shadow: var(--shadow-sm);
}
.trm-top-bar .trm-menu {
  font-family: var(--font-sans);
  font-weight: var(--font-medium);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.trm-top-bar .trm-menu a {
  position: relative;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}
.trm-top-bar .trm-menu a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.trm-top-bar .trm-menu a:hover {
  background: var(--primary-20);
  color: var(--primary);
}
.trm-top-bar .trm-menu a:hover::after {
  width: 60%;
}
.trm-btn {
  font-family: var(--font-sans);
  font-weight: var(--font-medium);
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-weak));
  box-shadow: 0 4px 12px var(--primary-30);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}
.trm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-50);
  filter: brightness(1.05);
}
.trm-btn:active {
  transform: translateY(0);
}
.trm-category {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: var(--font-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary-20), transparent);
  border: 1px solid var(--primary-30);
  color: var(--primary);
  transition: all 0.3s ease;
}
.trm-category:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px var(--primary-50);
}
.trm-category a {
  color: var(--primary) !important;
  text-decoration: none !important;
}
.trm-category:hover a,
.trm-category a:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}
.trm-label.trm-category:hover a {
  color: #ffffff !important;
}
code,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
pre {
  background: #2d3748;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
:not(pre) > code {
  background: var(--primary-20);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  font-weight: var(--font-medium);
}
blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05em;
  color: var(--body-color-light);
  border-left: 4px solid var(--accent-rose);
  background: linear-gradient(90deg, rgba(212, 165, 196, 0.1), transparent);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}
blockquote::before {
  content: '"';
  font-family: Georgia, serif;
  font-size: 3rem;
  color: var(--accent-rose);
  line-height: 1;
  float: left;
  margin-right: 12px;
  margin-top: -10px;
  opacity: 0.5;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover {
  color: var(--accent-rose);
}
.trm-card a {
  position: relative;
}
.trm-card a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-rose);
  transition: width 0.3s ease;
}
.trm-card a:hover::after {
  width: 100%;
}
.trm-footer {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--body-color-light);
  border-top: 1px solid rgba(139, 123, 184, 0.08);
  background: linear-gradient(180deg, transparent, rgba(139, 123, 184, 0.03));
}
.trm-footer a {
  opacity: 0.7;
}
.trm-footer a:hover {
  opacity: 1;
  color: var(--primary);
}
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.trm-card {
  animation: cardFadeIn 0.6s ease-out;
}
.trm-post-card:hover .trm-post-title {
  transform: translateX(4px);
  transition: transform 0.3s ease;
}
@media (max-width: 768px) {
  :root {
    --card-padding: 20px;
    --radius-lg: 16px;
  }
  .trm-banner-title {
    font-size: 2rem;
    letter-spacing: 0.03em;
  }
  .trm-post-title {
    font-size: 1.2rem;
  }
  body {
    line-height: 1.7;
  }
}
#artalk-container {
  font-family: var(--font-sans);
}
#artalk-container .atk-comment {
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}
#artalk-container .atk-comment:hover {
  background: var(--theme-bg2-color);
}
#artalk-container .atk-nick {
  font-family: var(--font-serif);
  font-weight: var(--font-semibold);
  color: var(--primary);
}
#artalk-container .atk-content {
  line-height: 1.8;
  color: var(--body-color);
}
#artalk-container .atk-send-btn {
  background: var(--primary);
  border-radius: var(--radius-md);
  font-weight: var(--font-medium);
}
#artalk-container .atk-send-btn:hover {
  background: var(--accent-rose);
}
.read-mode .trm-card {
  box-shadow: none;
  border: 1px solid rgba(139, 123, 184, 0.08);
}
.read-mode .trm-post-content {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 2;
  max-width: 720px;
  margin: 0 auto;
}
:root.dark {
  --primary: #a99bc9;
  --primary-70: rgba(169, 155, 201, 0.7);
  --primary-50: rgba(169, 155, 201, 0.5);
  --primary-30: rgba(169, 155, 201, 0.3);
  --primary-weak: #c4b8dd;
  --body-bg-color: #1e1b24;
  --theme-bg-color: #2a2633;
  --theme-bg2-color: #353040;
  --body-color: #d8d4e0;
  --body-color-light: #a8a0b8;
  --heading-color: #f0ecf5;
  --accent-warm: #e8b8c8;
  --accent-cool: #a8c0d8;
  --accent-rose: #d8b8d0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);
}
:root.dark .trm-top-bar {
  background: rgba(42, 38, 51, 0.9);
  border-bottom: 1px solid rgba(169, 155, 201, 0.08);
}
:root.dark .trm-top-bar .trm-menu a {
  color: var(--body-color);
}
:root.dark .trm-top-bar .trm-menu a:hover {
  background: var(--primary-30);
  color: var(--primary);
}
:root.dark .trm-top-bar .trm-menu a::after {
  background: var(--primary);
}
:root.dark .trm-card {
  background: var(--theme-bg-color);
  border: 1px solid rgba(169, 155, 201, 0.08);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
:root.dark .trm-card:hover {
  box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
:root.dark .trm-category {
  background: linear-gradient(135deg, var(--primary-30), transparent);
  border-color: var(--primary-30);
  color: var(--primary) !important;
}
:root.dark .trm-category:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}
:root.dark .trm-category a {
  color: var(--primary) !important;
}
:root.dark .trm-category:hover a,
:root.dark .trm-category a:hover {
  color: #ffffff !important;
}
:root.dark .trm-footer {
  border-top: 1px solid rgba(169, 155, 201, 0.08);
  background: linear-gradient(180deg, transparent, rgba(169, 155, 201, 0.03));
}
:root.dark .read-mode .trm-card {
  border: 1px solid rgba(169, 155, 201, 0.1);
}
:root.dark pre {
  background: #252230;
}
:root.dark blockquote {
  background: linear-gradient(90deg, rgba(212, 165, 196, 0.12), transparent);
}
.trm-cover-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease, opacity 0.5s ease;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.trm-cover-frame:hover .trm-cover-img {
  transform: scale(1.05);
}
:root.dark .trm-cover-img {
  opacity: 0.95;
}
.trm-cover-frame {
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.trm-blog-card .trm-cover-frame {
  position: relative;
  height: 200px;
  display: block;
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.trm-cover-img[data-random-img] {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}
