/* ============================================
   黑胶唱片 - 书签导航风格样式
   www.heijiaochangpian.cn
   ============================================ */

/* CSS 变量 */
:root {
  --accent-color: #ff5722;
  --accent-light: #ff8a65;
  --accent-dark: #e64a19;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #888888;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

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

/* ============================================
   布局容器
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

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

.nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  min-width: 200px;
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-color);
  color: white;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
}

.hero-action:hover {
  background: var(--accent-dark);
  color: white;
  transform: translateY(-2px);
}

/* ============================================
   分类集合
   ============================================ */
.collections {
  padding: 20px 0 40px;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.collection-item {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.collection-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.collection-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.collection-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.collection-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   书签卡片
   ============================================ */
.bookmarks-section {
  padding: 20px 0 40px;
}

.bookmark-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bookmark-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
  transition: var(--transition);
}

.bookmark-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent-color);
}

.bookmark-thumb {
  width: 80px;
  height: 80px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

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

.bookmark-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-url {
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: block;
}

.bookmark-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bookmark-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bookmark-tag {
  background: rgba(255, 87, 34, 0.15);
  color: var(--accent-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.bookmark-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   文章列表
   ============================================ */
.articles-section {
  padding: 40px 0;
  background: var(--bg-secondary);
}

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

.articles-column h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.article-item:hover {
  background: var(--bg-card);
}

.article-item::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
}

.article-item a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.article-item a:hover {
  color: var(--text-primary);
}

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

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* ============================================
   分类页头部
   ============================================ */
.category-header {
  padding: 30px 0;
  text-align: center;
}

.category-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

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

/* ============================================
   筛选器
   ============================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 20px 0;
  flex-wrap: wrap;
}

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

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* ============================================
   标签云
   ============================================ */
.tags-section {
  padding: 30px 0;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.tag-item:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.tag-count {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 4px;
}

.tag-item:hover .tag-count {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   文章详情页
   ============================================ */
.article-header {
  padding: 30px 0;
  text-align: center;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-meta-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* ============================================
   内容区域
   ============================================ */
.content-section {
  padding: 30px 0 50px;
}

.content-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border-color);
}

.content-box h2 {
  font-size: 1.5rem;
  margin: 30px 0 16px;
  color: var(--text-primary);
}

.content-box h2:first-child {
  margin-top: 0;
}

.content-box p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.content-box ul,
.content-box ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
}

.content-box li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.content-box a {
  color: var(--accent-light);
  text-decoration: underline;
}

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

/* 信息卡片 */
.info-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 20px 0;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--accent-light);
}

.info-list {
  list-style: none;
  padding: 0;
}

.info-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

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

.info-label {
  color: var(--text-muted);
}

.info-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* 操作按钮 */
.action-bar {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
}

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

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

/* ============================================
   相关推荐
   ============================================ */
.related-section {
  padding: 30px 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.related-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.related-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.related-title {
  font-size: 0.95rem;
  font-weight: 500;
}

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

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}

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

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

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

/* ============================================
   页脚 Footer
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 40px;
}

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

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

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

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

.footer-section a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

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

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

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

  .bookmark-thumb {
    width: 100%;
    height: 120px;
  }

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

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

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

  .content-box {
    padding: 20px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }
}
