/*
Theme Name: NexusCore
Theme URI: https://example.com/nexuscore
Author: Your Name
Author URI: https://example.com
Description: 全功能现代化 WordPress 主题
Version: 1.0.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: nexuscore
*/

/* ========== 基础 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fa;
  color: #1a1a2e;
  line-height: 1.6;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

.nc-layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

/* ========== 头部 ========== */
.nc-header {
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 999;
}

.nc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nc-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.5px;
}

.nc-nav-menu, .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nc-nav-menu > li, .menu > li {
  position: relative;
  list-style: none !important;
}

.nc-nav-menu > li > a, .menu > li > a {
  display: block;
  padding: 0.6rem 1rem;
  color: #444;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.nc-nav-menu > li > a:hover, .menu > li > a:hover {
  color: #6366f1;
}

.nc-nav-menu ul, .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  min-width: 180px;
  padding: 0.5rem;
  list-style: none !important;
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  z-index: 1000;
}

.nc-nav-menu > li:hover > ul, .menu > li:hover > .sub-menu {
  display: block;
}

.nc-nav-menu ul li a {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: #444;
  border-radius: 6px;
  transition: all 0.15s;
}

.nc-nav-menu ul li a:hover {
  background: #6366f1;
  color: #fff;
}

.nc-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ========== 分类归档页 ========== */
.nc-archive-header {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nc-archive-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nc-archive-label {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.nc-archive-desc {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.nc-archive-count {
  color: #999;
  font-size: 0.9rem;
}

/* ========== 文章列表 - 统一高度 ========== */
.nc-article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nc-article-item {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s;
  height: 160px;
}

.nc-article-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.nc-article-link {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.nc-article-thumb {
  width: 220px;
  height: 100%;
  overflow: hidden;
}

.nc-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nc-thumb-mini {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nc-thumb-mini span {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.nc-article-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.nc-article-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.nc-article-desc {
  color: #888;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.nc-article-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: #aaa;
  margin-top: auto;
}

.nc-meta-cat {
  font-weight: 500;
  color: #6366f1;
}

/* ========== 分页 ========== */
.nc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.nc-pagination a,
.nc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border-radius: 10px;
  color: #444;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.nc-pagination a:hover,
.nc-pagination .current {
  background: #6366f1;
  color: #fff;
}

/* ========== 侧边栏 ========== */
.nc-sidebar .widget {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nc-sidebar .widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #6366f1;
  color: #1a1a2e;
}

/* ========== 文章详情页 ========== */
.nc-article-single {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nc-article-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.nc-article-cats {
  margin-bottom: 16px;
}

.nc-cat-tag {
  display: inline-block;
  background: #f0f0ff;
  color: #6366f1;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 8px;
}

.nc-article-single-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.nc-article-single-meta {
  display: flex;
  gap: 20px;
  color: #999;
  font-size: 0.9rem;
}

.nc-article-single-meta .nc-author {
  color: #6366f1;
  font-weight: 600;
}

.nc-article-featured-image {
  margin: -40px -40px 30px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.nc-article-featured-image img {
  width: 100%;
  height: auto;
}

.nc-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.nc-article-content p {
  margin-bottom: 1.2em;
}

.nc-article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 1em;
  color: #1a1a2e;
  padding-left: 16px;
  border-left: 4px solid #6366f1;
}

.nc-article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5em 0 0.8em;
  color: #1a1a2e;
}

.nc-article-content img {
  border-radius: 12px;
  margin: 1.2em 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

.nc-article-content a {
  color: #6366f1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nc-article-content blockquote {
  background: #f8f9fa;
  border-left: 4px solid #6366f1;
  padding: 20px 24px;
  margin: 1.5em 0;
  border-radius: 0 12px 12px 0;
  color: #555;
}

.nc-article-content ul,
.nc-article-content ol {
  margin: 1em 0;
  padding-left: 2em;
}

.nc-article-content li {
  margin-bottom: 0.5em;
}

.nc-article-content code {
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}

.nc-article-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f0f0f0;
}

.nc-article-tags {
  margin-bottom: 20px;
}

.nc-tag {
  display: inline-block;
  background: #f0f0ff;
  color: #6366f1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.nc-tag:hover {
  background: #6366f1;
  color: #fff;
}

.nc-share-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #666;
}

.nc-share-btn {
  background: #f0f0f0;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nc-share-btn:hover {
  background: #6366f1;
  color: #fff;
}

.nc-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.nc-nav-prev,
.nc-nav-next {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  transition: all 0.2s;
}

.nc-nav-prev:hover,
.nc-nav-next:hover {
  background: #f0f0ff;
}

.nc-nav-prev span,
.nc-nav-next span {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 8px;
}

.nc-nav-prev a,
.nc-nav-next a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.4;
}

.nc-nav-next {
  text-align: right;
}

.nc-comments-area {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #f0f0f0;
}

/* ========== 页脚 ========== */
.nc-footer {
  background: #1a1a2e;
  color: #888;
  padding: 50px 0 30px;
  margin-top: 60px;
}

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

.nc-footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.nc-footer-col a,
.nc-footer-col p {
  display: block;
  color: #888;
  font-size: 0.9rem;
  line-height: 2.2;
  transition: color 0.2s;
}

.nc-footer-col a:hover {
  color: #6366f1;
}

.nc-footer-bottom {
  border-top: 1px solid #333;
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .nc-layout-with-sidebar {
    grid-template-columns: 1fr;
  }
  
  .nc-article-link {
    grid-template-columns: 180px 1fr;
  }
  
  .nc-article-thumb {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .nc-menu-toggle {
    display: block;
  }
  
  .nc-nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column !important;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  .nc-nav-menu.is-open {
    transform: translateX(0);
  }
  
  .nc-article-item {
    height: auto;
  }
  
  .nc-article-link {
    grid-template-columns: 1fr;
  }
  
  .nc-article-thumb {
    width: 100%;
    height: 180px;
  }
  
  .nc-article-single {
    padding: 24px;
    border-radius: 0;
  }
  
  .nc-article-single-title {
    font-size: 1.5rem;
  }
  
  .nc-article-featured-image {
    margin: -24px -24px 20px;
    border-radius: 0;
  }
  
  .nc-article-nav {
    grid-template-columns: 1fr;
  }
  
  .nc-nav-next {
    text-align: left;
  }
  
  .nc-footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* 空状态 */
.nc-empty {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}
