:root {
  --cream-light: #FFF8F0;
  --cream-main: #FFEFDB;
  --cream-medium: #FFE4C4;
  --cream-dark: #FFDAB9;
  --pink-light: #FFF0F5;
  --pink-main: #FFB6C1;
  --pink-dark: #FF69B4;
  --blue-light: #F0F8FF;
  --blue-main: #B0D4F1;
  --text-primary: #5D4037;
  --text-secondary: #8D6E63;
  --text-light: #A1887F;
  --white: #FFFFFF;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.08);
  --shadow-strong: rgba(0, 0, 0, 0.12);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: linear-gradient(135deg, var(--cream-light) 0%, var(--pink-light) 100%);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

a {
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

a:hover {
  color: var(--pink-dark);
}

img {
  max-width: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部导航 */
.header {
  background: linear-gradient(135deg, var(--white) 0%, var(--cream-light) 100%);
  box-shadow: 0 2px 20px var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo:hover {
  color: var(--pink-dark);
}

.logo-icon {
  font-size: 32px;
}

.nav {
  display: flex;
  gap: 25px;
}

.nav-item {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
  background: var(--cream-main);
  color: var(--text-primary);
}

.search-box {
  flex: 1;
  max-width: 300px;
}

.search-box form {
  display: flex;
  background: var(--white);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow-light);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 10px 20px;
  outline: none;
  background: transparent;
}

.search-box button {
  background: var(--cream-main);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition);
}

.search-box button:hover {
  background: var(--pink-main);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* 主内容区 */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.content-main {
  min-width: 0;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, var(--white) 0%, var(--cream-light) 100%);
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  box-shadow: 0 8px 30px var(--shadow-light);
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
}

/* 分类标签 */
.category-tags {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tag {
  padding: 8px 20px;
  background: var(--white);
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 10px var(--shadow-light);
  transition: var(--transition);
}

.tag:hover,
.tag.active {
  background: var(--pink-main);
  color: var(--white);
}

/* 文章卡片 */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.article-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.article-cover {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-light);
}

.article-category {
  background: var(--cream-main);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.article-title {
  font-size: 24px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-title a:hover {
  color: var(--pink-dark);
}

.article-summary {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.8;
}

.read-more {
  color: var(--pink-dark);
  font-weight: 500;
}

/* 文章详情 */
.article-detail {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: 0 4px 20px var(--shadow-light);
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--cream-dark);
}

.article-title-detail {
  font-size: 32px;
  margin-top: 15px;
  line-height: 1.4;
}

.article-cover-large {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
}

.article-cover-large img {
  width: 100%;
}

.article-content {
  font-size: 16px;
  line-height: 2;
}

.article-content h2 {
  font-size: 24px;
  margin: 30px 0 20px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 20px;
  margin: 25px 0 15px;
}

.article-content p {
  margin-bottom: 15px;
}

.article-content ul,
.article-content ol {
  margin: 15px 0;
  padding-left: 30px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content blockquote {
  background: var(--cream-light);
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid var(--pink-main);
  border-radius: 8px;
}

.article-content code {
  background: var(--cream-medium);
  padding: 2px 8px;
  border-radius: 4px;
}

.article-content pre {
  background: var(--cream-light);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--cream-dark);
}

.tag-item {
  background: var(--cream-main);
  padding: 6px 16px;
  border-radius: 15px;
  font-size: 14px;
}

/* 文章导航 */
.article-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.nav-prev,
.nav-next {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-light);
}

.nav-prev span,
.nav-next span {
  display: block;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 8px;
}

.nav-prev p,
.nav-next p {
  font-weight: 500;
}

/* 相关文章 */
.related-articles {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  margin: 30px 0;
  box-shadow: 0 4px 20px var(--shadow-light);
}

.section-title {
  font-size: 22px;
  margin-bottom: 20px;
}

.related-list {
  list-style: none;
}

.related-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.related-list li:last-child {
  border-bottom: none;
}

/* 分类页头 */
.category-header {
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow-light);
}

.category-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.category-header p {
  color: var(--text-secondary);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-link {
  padding: 10px 16px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-light);
}

.page-link:hover,
.page-link.active {
  background: var(--pink-main);
  color: var(--white);
}

/* 归档页 */
.page-title {
  font-size: 32px;
  text-align: center;
  margin-bottom: 30px;
}

.archives-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.archive-month {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.archive-title {
  font-size: 22px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--cream-dark);
}

.archive-articles {
  list-style: none;
}

.archive-articles li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-light);
}

.archive-articles li:last-child {
  border-bottom: none;
}

.archive-date {
  color: var(--text-light);
  font-size: 14px;
}

/* 关于页 */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.about-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.about-card h2 {
  font-size: 22px;
  margin-bottom: 15px;
}

.about-card ul {
  padding-left: 25px;
}

.about-card li {
  margin-bottom: 10px;
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-widget {
  background: var(--white);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.widget-title {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--cream-dark);
}

.category-list {
  list-style: none;
}

.category-item {
  display: block;
  padding: 10px 15px;
  margin-bottom: 8px;
  background: var(--cream-light);
  border-radius: 10px;
  transition: var(--transition);
}

.category-item:hover,
.category-item.active {
  background: var(--pink-main);
  color: var(--white);
}

.random-articles {
  list-style: none;
}

.random-articles li {
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-light);
}

.random-articles li:last-child {
  border-bottom: none;
}

.tip-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

/* 页脚 */
.footer {
  background: linear-gradient(135deg, var(--white) 0%, var(--cream-light) 100%);
  padding: 50px 0 30px;
  margin-top: 60px;
  box-shadow: 0 -2px 20px var(--shadow-light);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-section p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 2px dashed var(--cream-dark);
  color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--border-radius);
}

.empty-state p {
  font-size: 18px;
  color: var(--text-light);
}

.back-link {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 24px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-light);
}

/* 响应式 */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    margin-top: 15px;
  }

  .nav.active {
    display: flex;
  }

  .search-box {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .article-card {
    padding: 20px;
  }

  .article-title {
    font-size: 20px;
  }

  .article-title-detail {
    font-size: 24px;
  }

  .article-detail {
    padding: 25px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card,
.sidebar-widget,
.about-card,
.archive-month {
  animation: fadeIn 0.5s ease;
}

.article-watermark {
  position: relative;
  overflow: hidden;
}

.article-watermark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 100px,
      rgba(93, 64, 55, 0.03) 100px,
      rgba(93, 64, 55, 0.03) 200px
    );
  pointer-events: none;
  z-index: 1;
}

.article-watermark::after {
  content: 'molifo.com';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 120px;
  color: rgba(93, 64, 55, 0.05);
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

@media print {
  .article-watermark::before,
  .article-watermark::after {
    display: block !important;
    background: none !important;
    color: rgba(0, 0, 0, 0.5) !important;
  }
}
