/* 矿物收藏 - 样式表
 * 查询关键词: 矿物收藏 www.kuangwuzs.cn 较低
 */

/* ========== CSS 变量 ========== */
:root {
  --accent-color: #ff5722;
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #f5f7fa;
  --bg-white: #fff;
  --border-color: #e8e8e8;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

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

html {
  font-size: 16px;
}

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

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

ul, ol {
  list-style: none;
}

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

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

.section {
  padding: 40px 0;
}

/* ========== 页头 ========== */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

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

.nav a {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

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

.search-box {
  position: relative;
}

.search-box input {
  width: 240px;
  padding: 8px 16px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  background: var(--bg-color);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  width: 280px;
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
}

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

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

.breadcrumb .separator {
  opacity: 0.5;
}

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

/* ========== Hero 区域 ========== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

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

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

.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 24px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}

.hero-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

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

.collection-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.collection-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
}

.collection-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.collection-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== 矿物卡片 ========== */
.mineral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.mineral-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.mineral-image {
  width: 100%;
  height: 180px;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.mineral-content {
  padding: 16px;
}

.mineral-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.mineral-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}

.mineral-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.mineral-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 4px 10px;
  background: var(--bg-color);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-light);
}

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

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

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

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

.category-header p span {
  color: var(--accent-color);
  font-weight: 600;
}

/* ========== 筛选器 ========== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.filter-bar span {
  font-size: 0.9rem;
  color: var(--text-light);
}

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

.filter-options a {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
}

.filter-options a:hover,
.filter-options a.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

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

.tag-cloud a {
  padding: 6px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
}

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

.tag-cloud a .count {
  color: var(--text-muted);
  margin-left: 4px;
}

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

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
}

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

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

.article-content {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
}

.article-image {
  width: 100%;
  height: 400px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin-bottom: 32px;
}

.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
}

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

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 24px 0 12px;
}

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

.article-body ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

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

.article-info {
  background: var(--bg-color);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-top: 32px;
}

.article-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--primary-color);
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.info-item .label {
  color: var(--text-muted);
  min-width: 100px;
}

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

/* ========== 相关推荐 ========== */
.related-section {
  margin-top: 40px;
}

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

.related-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--accent-color);
}

.related-card .image {
  height: 100px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 12px;
}

.related-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* ========== 侧边栏模块 ========== */
.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.sidebar-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

.article-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

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

/* ========== 两栏布局 ========== */
.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ========== 文章页布局 ========== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

/* ========== 页脚 ========== */
.footer {
  background: var(--primary-color);
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

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

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  opacity: 0.8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

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

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

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

.error-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 12px;
}

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

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

.btn {
  padding: 12px 28px;
  border-radius: 24px;
  font-weight: 500;
  transition: var(--transition);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

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

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

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

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

  .search-box {
    order: 2;
  }

  .search-box input {
    width: 180px;
  }

  .search-box input:focus {
    width: 200px;
  }

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

  .hero p {
    font-size: 1rem;
  }

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

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

  .mineral-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

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

  .article-content {
    padding: 24px;
  }

  .article-image {
    height: 250px;
  }

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

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

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

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

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-options {
    flex-wrap: wrap;
  }

  .error-actions {
    flex-direction: column;
  }
}
