/* 相机镜头 - 资讯风格样式 */
:root {
  --accent-color: #d63384;
  --accent-light: #f8d7e8;
  --accent-dark: #a02565;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #1a1a1a;
  --border-color: #e5e5e5;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
  --gap: 24px;
}

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

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

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

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

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

ul {
  list-style: none;
}

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

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

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

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

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

.nav a {
  font-weight: 500;
  font-size: 15px;
}

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

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

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

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

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap);
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: var(--gap);
}

/* Hero Section */
.hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
  border-radius: var(--radius);
  padding: 48px;
  color: #fff;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar-left,
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.widget {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.widget-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

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

.widget-list .num {
  width: 20px;
  height: 20px;
  background: var(--bg-secondary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

/* Main Content */
.main {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title a {
  font-size: 14px;
  color: var(--accent-color);
}

/* Featured Cards */
.featured-grid {
  display: grid;
  gap: 20px;
}

.featured-card {
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  transition: box-shadow 0.2s;
}

.featured-card:hover {
  box-shadow: var(--shadow-hover);
}

.featured-card .image {
  width: 280px;
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.featured-card .content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-card .category {
  color: var(--accent-color);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.featured-card h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.featured-card .excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.featured-card .meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
}

/* Content List */
.content-list {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.content-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.content-item:first-child {
  padding-top: 0;
}

.content-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.content-item .image {
  width: 160px;
  height: 100px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.content-item .info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-item .category {
  color: var(--accent-color);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.content-item h4 {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.content-item .excerpt {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}

.content-item .meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 14px;
}

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

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

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: var(--gap);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

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

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

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

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

/* Category Header */
.category-header {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: var(--gap);
  text-align: center;
}

.category-header h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

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

/* Article Page */
.article-header {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: var(--gap);
}

.article-header .category {
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.article-header h1 {
  font-size: 28px;
  line-height: 1.3;
  margin-bottom: 20px;
}

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

.article-meta .author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-meta .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-weight: 600;
}

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

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

.article-content h2 {
  font-size: 22px;
  margin: 32px 0 16px;
}

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

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

.article-content .image-placeholder {
  width: 100%;
  height: 400px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  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;
}

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

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

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

/* TOC */
.toc {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
}

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

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

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

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

/* Author Widget */
.author-widget {
  text-align: center;
}

.author-widget .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-light);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 32px;
  font-weight: 600;
}

.author-widget h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.author-widget p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Share Widget */
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

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

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

/* 404 Page */
.error-page {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-primary);
  border-radius: var(--radius);
}

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

.error-title {
  font-size: 24px;
  margin-bottom: 16px;
}

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}

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

/* Footer */
.footer {
  background: var(--bg-dark);
  color: #fff;
  margin-top: 48px;
}

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

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

.footer-brand p {
  color: #999;
  font-size: 14px;
  line-height: 1.6;
}

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

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

.footer-links a {
  color: #999;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding: 24px var(--gap);
  text-align: center;
  color: #666;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 180px 1fr;
  }

  .sidebar-right {
    display: none;
  }
}

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

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    margin-top: 16px;
    overflow-x: auto;
  }

  .search-box {
    width: auto;
    flex: 1;
    margin-left: 16px;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar-left {
    display: none;
  }

  .hero {
    padding: 32px 24px;
  }

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

  .featured-card {
    flex-direction: column;
  }

  .featured-card .image {
    width: 100%;
    height: 200px;
  }

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

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

  .article-content {
    padding: 24px;
  }

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

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

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