/* 摩托车旅行 - 资讯风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #d63384;
  --primary-color: #e63946;
  --secondary-color: #1d3557;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #f8f9fa;
  --bg-white: #fff;
  --border-color: #e9ecef;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1200px;
  --sidebar-width: 220px;
  --header-height: 64px;
}

/* 重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

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

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

ul {
  list-style: none;
}

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

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

/* 页头 */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

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

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

.nav a {
  font-size: 0.9375rem;
  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;
  background: var(--bg-color);
  border-radius: var(--radius);
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 0.875rem;
}

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

/* 三栏布局 */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
  gap: 24px;
  padding: 24px 0;
}

.sidebar-left,
.sidebar-right {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: fit-content;
}

.main {
  min-width: 0;
}

/* 卡片组件 */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 16px 20px;
}

/* 侧边栏菜单 */
.menu-list li {
  border-bottom: 1px solid var(--border-color);
}

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

.menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.9375rem;
  color: var(--text-light);
}

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

.menu-list a.active {
  color: var(--accent-color);
  font-weight: 500;
}

.menu-list .count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-color);
  padding: 2px 8px;
  border-radius: 12px;
}

/* 链接列表 */
.link-list li {
  margin-bottom: 10px;
}

.link-list a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
}

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

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-light);
  transition: all 0.2s;
}

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

.tag-hot {
  background: rgba(214, 51, 132, 0.1);
  color: var(--accent-color);
}

/* 文章列表 */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.content-item:hover {
  box-shadow: var(--shadow-hover);
}

.content-thumb {
  width: 180px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.content-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.content-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 12px;
  flex: 1;
}

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

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

.content-category {
  color: var(--accent-color);
  font-weight: 500;
}

/* 特色文章 */
.featured-section {
  margin-bottom: 24px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.featured-main {
  grid-column: span 2;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 320px;
}

.featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
}

.featured-overlay .content-title {
  color: #fff;
  font-size: 1.375rem;
  margin-bottom: 8px;
}

.featured-overlay .content-title a {
  color: #fff;
}

.featured-overlay .content-title a:hover {
  color: var(--accent-color);
}

.featured-overlay .content-meta {
  color: rgba(255,255,255,0.8);
}

.featured-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 160px;
}

.featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-item .featured-overlay {
  padding: 20px 16px 16px;
}

.featured-item .content-title {
  font-size: 1rem;
}

/* 小部件 */
.widget-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.widget-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.widget-num.top {
  background: var(--accent-color);
  color: #fff;
}

.widget-title {
  font-size: 0.875rem;
  line-height: 1.5;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.widget-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 16px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
}

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

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

.pagination .prev,
.pagination .next {
  padding: 0 16px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

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

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

/* 页面标题 */
.page-header {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-desc {
  font-size: 0.9375rem;
  color: var(--text-light);
}

/* 文章详情 */
.article-header {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

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

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

.article-meta .author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color);
  font-weight: 500;
}

.article-meta .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-color);
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

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

.article-content {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  font-size: 1rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

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

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

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

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

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

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

/* 目录 */
.toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--accent-color);
  border-left-color: var(--accent-color);
}

/* 作者卡片 */
.author-card {
  text-align: center;
  padding: 24px;
}

.author-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-color);
  margin: 0 auto 12px;
}

.author-card .name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.author-card .bio {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.author-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.author-stats .stat {
  text-align: center;
}

.author-stats .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
}

.author-stats .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 分享按钮 */
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  color: var(--text-light);
  transition: all 0.2s;
}

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

/* 相关文章 */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-item {
  display: flex;
  gap: 12px;
}

.related-item img {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.related-item .title {
  font-size: 0.875rem;
  line-height: 1.5;
  flex: 1;
}

/* 广告位 */
.ad-placeholder {
  background: var(--bg-color);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

/* 筛选器 */
.filter-group {
  margin-bottom: 16px;
}

.filter-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-light);
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-color);
}

/* 页脚 */
.footer {
  background: var(--secondary-color);
  color: #fff;
  padding: 48px 0 24px;
  margin-top: 48px;
}

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

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

/* 404页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
}

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

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.error-desc {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #b52a6f;
  color: #fff;
}

/* Hero区域 */
.hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #457b9d 100%);
  color: #fff;
  padding: 48px 0;
  margin-bottom: 24px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-tags .tag {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.hero-tags .tag:hover {
  background: var(--accent-color);
}

/* 响应式 */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr 280px;
  }

  .sidebar-left {
    display: none;
  }
}

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

  .nav {
    order: 3;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .search-box {
    width: auto;
    flex: 1;
  }

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

  .sidebar-right {
    display: none;
  }

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

  .featured-main {
    grid-column: span 1;
    height: 240px;
  }

  .content-item {
    flex-direction: column;
  }

  .content-thumb {
    width: 100%;
    height: 180px;
  }

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

  .article-content {
    padding: 20px;
  }

  .hero-title {
    font-size: 1.75rem;
  }
}

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

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