/* 书法练习 - 全局样式 */
:root {
  --primary-color: #8B4513;
  --accent-color: #D4A574;
  --bg-color: #FDF8F0;
  --card-bg: #FFFFFF;
  --text-primary: #2C1810;
  --text-secondary: #6B5B4F;
  --border-color: #E8DDD0;
  --shadow: 0 2px 8px rgba(139, 69, 19, 0.08);
  --shadow-hover: 0 4px 16px rgba(139, 69, 19, 0.12);
  --radius: 8px;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

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

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

/* 页头 */
.header {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
  color: #fff;
  padding: 0 20px;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.logo span {
  color: var(--accent-color);
}

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

.nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.nav a:hover {
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 16px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  width: 160px;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.6);
}

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

/* Hero 区域 */
.hero {
  text-align: center;
  padding: 48px 20px;
  background: linear-gradient(180deg, #FDF8F0 0%, #F5EDE3 100%);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  font-weight: 600;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 24px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #A0522D;
  color: #fff;
  transform: translateY(-2px);
}

/* 区块标题 */
.section-title {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

/* 分类网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

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

.category-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #C4956A 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
  color: #fff;
}

.category-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 内容卡片网格 */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.content-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

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

.card-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #E8DDD0 0%, #D4C4B0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 3rem;
}

.card-body {
  padding: 16px;
}

.card-tag {
  display: inline-block;
  background: rgba(139, 69, 19, 0.1);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* 列表样式 */
.content-list {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
}

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

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

.list-item:hover {
  background: rgba(139, 69, 19, 0.03);
}

.list-item-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #C4956A 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
}

.list-item-title {
  font-size: 1rem;
  margin-bottom: 4px;
}

.list-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.list-item-meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* 面包屑 */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.breadcrumb span {
  margin: 0 8px;
}

/* 页面头部 */
.page-header {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

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

/* 筛选标签 */
.filter-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag {
  padding: 6px 14px;
  background: rgba(139, 69, 19, 0.08);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.tag:hover {
  background: var(--primary-color);
  color: #fff;
}

/* 文章页 */
.article-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.article-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 1.8rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.article-meta span {
  margin: 0 12px;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

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

.article-content h2 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
  color: var(--primary-color);
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 24px 0 12px;
}

.article-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #E8DDD0 0%, #D4C4B0 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  font-size: 4rem;
  color: var(--text-secondary);
}

/* 相关推荐 */
.related-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

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

.related-card {
  background: var(--bg-color);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.related-card:hover {
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

/* 底部三栏 */
.bottom-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.bottom-column {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.bottom-column h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.bottom-column ul {
  list-style: none;
}

.bottom-column li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.bottom-column a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

.bottom-column a:hover {
  color: var(--primary-color);
}

/* 页脚 */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.8);
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-column h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

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

.error-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

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

/* 响应式 */
@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-top: 12px;
    gap: 20px;
    justify-content: center;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

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

  .bottom-section {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-container {
    padding: 24px;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .error-code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    display: none;
  }
}
