/* 刺绣工艺 - 全局样式 */
:root {
  --accent-color: #673ab7;
  --accent-light: #9c27b0;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f6fc;
  --bg-card: #fff;
  --border-color: #e8e4f0;
  --shadow-sm: 0 2px 8px rgba(103, 58, 183, 0.08);
  --shadow-md: 0 4px 16px rgba(103, 58, 183, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部导航 */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

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

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: 20px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 160px;
  font-size: 14px;
}

.search-box button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* 个人资料头部 */
.profile-header {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  margin: 0 auto 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.profile-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-role {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.profile-bio {
  max-width: 600px;
  margin: 0 auto 24px;
  opacity: 0.85;
  line-height: 1.8;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  transition: background 0.2s;
}

.profile-links a:hover {
  background: rgba(255,255,255,0.25);
}

/* 内容区域 */
.content {
  padding: 40px 0;
}

.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent-color), var(--accent-light));
  border-radius: 2px;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f0e6f7, #e8dff5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 48px;
}

.card-body {
  padding: 20px;
}

.card-category {
  font-size: 12px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-title a {
  color: var(--text-primary);
}

.card-title a:hover {
  color: var(--accent-color);
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 列表 */
.list {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

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

.list-item:hover {
  background: var(--bg-secondary);
}

.list-item-number {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  margin-right: 16px;
  flex-shrink: 0;
}

.list-item-number.hot {
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: #fff;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-title a {
  color: var(--text-primary);
}

.list-item-title a:hover {
  color: var(--accent-color);
}

.list-item-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* 三栏布局 */
.three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.column-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

/* 面包屑 */
.breadcrumb {
  background: var(--bg-card);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* 分类头部 */
.category-header {
  background: var(--bg-card);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.category-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.category-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 24px;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.category-stat {
  text-align: center;
}

.category-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

.category-stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

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

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.pagination a:hover {
  background: var(--accent-color);
  color: #fff;
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 文章详情 */
.article-header {
  background: var(--bg-card);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-featured-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 24px 0;
}

.article-content {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
}

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

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

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

.article-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* 相关文章 */
.related-section {
  margin-top: 48px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 404页面 */
.error-page {
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.8;
}

.error-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* 页脚 */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 16px;
}

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

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .card-grid,
  .three-column,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .search-box {
    display: none;
  }

  .profile-header {
    padding: 40px 20px;
  }

  .profile-name {
    font-size: 24px;
  }

  .profile-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 20px;
  }

  .card-grid,
  .three-column,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-content {
    padding: 24px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .error-code {
    font-size: 80px;
  }
}
