
:root {
    --skin-primary: #334155;
    --skin-primary-dk: #1e293b;
    --skin-secondary: #0ea5e9;
    --skin-bg: #f8fafc;
    --skin-bg2: #f1f5f9;
    --skin-bg3: #e2e8f0;
    --skin-bg4: #cbd5e1;
    --skin-border: #94a3b8;
    --skin-text: #020617;
    --skin-text2: #334155;
    --skin-text3: #64748b;
    --skin-font: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', sans-serif;
    --skin-radius: 4px;
    --skin-radius-lg: 8px;
    --skin-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ============================================
   Magazine Reader - Main Stylesheet
   Two-column magazine layout
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
}
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-dk); }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.nw-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Two-column layout */
.nw-layout-two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding-top: 24px;
    padding-bottom: 48px;
}

/* Topbar */
.nw-topbar {
    background: var(--color-bg2);
    border-bottom: 1px solid var(--color-border);
    padding: 6px 0;
    font-size: 13px;
    color: var(--color-text3);
}
.nw-topbar .nw-container { display: flex; justify-content: space-between; align-items: center; }
.nw-topbar-links a { margin-left: 16px; color: var(--color-text2); }
.nw-topbar-links a:hover { color: var(--color-primary); }

/* Header */
.nw-header {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}
.nw-header-inner { display: flex; align-items: center; gap: 24px; }
.nw-logo { display: flex; align-items: center; gap: 8px; }
.nw-logo-text { font-size: 22px; font-weight: 700; color: var(--color-text); }
.nw-main-nav { flex: 1; }
.nw-nav-list { list-style: none; display: flex; gap: 4px; }
.nw-nav-list li a {
    display: block;
    padding: 8px 14px;
    color: var(--color-text2);
    font-size: 15px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.nw-nav-list li a:hover,
.nw-nav-list li.current-menu-item a {
    color: var(--color-primary);
    background: var(--color-bg2);
}
.nw-header-cta { margin-left: auto; }
.nw-header-spacer { height: 0; }

/* Buttons */
.nw-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.nw-btn-primary { background: var(--color-primary); color: #fff; }
.nw-btn-primary:hover { background: var(--color-primary-dk); color: #fff; }
.nw-btn-block { display: block; width: 100%; text-align: center; }

/* Breadcrumb */
.nw-breadcrumb { padding: 12px 20px; font-size: 13px; color: var(--color-text3); }
.nw-breadcrumb ol { list-style: none; display: flex; gap: 6px; max-width: 1200px; margin: 0 auto; }
.nw-breadcrumb li::after { content: '/'; margin-left: 6px; }
.nw-breadcrumb li:last-child::after { content: ''; }
.nw-breadcrumb a { color: var(--color-text2); }

/* Featured Slider */
.nw-featured-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
}
.nw-slider-track { display: flex; transition: transform 0.5s ease; }
.nw-slide { min-width: 100%; position: relative; }
.nw-slide img { width: 100%; height: 320px; object-fit: cover; }
.nw-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}
.nw-slide-cat {
    display: inline-block;
    background: var(--color-primary);
    padding: 2px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    margin-bottom: 6px;
}
.nw-slide-title { font-size: 20px; font-weight: 700; }
.nw-slider-prev, .nw-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}
.nw-slider-prev { left: 12px; }
.nw-slider-next { right: 12px; }

/* Category Tabs */
.nw-category-tabs { margin-bottom: 24px; }
.nw-tabs-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.nw-tab-btn {
    padding: 6px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    color: var(--color-text2);
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: var(--transition);
}
.nw-tab-btn.active, .nw-tab-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Section Title */
.nw-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
}

/* Post List (left thumb + right content) */
.nw-post-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}
.nw-post-thumb { flex-shrink: 0; width: 200px; border-radius: var(--radius); overflow: hidden; }
.nw-post-thumb img { width: 100%; height: 130px; object-fit: cover; }
.nw-post-body { flex: 1; }
.nw-post-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.nw-post-title a { color: var(--color-text); }
.nw-post-title a:hover { color: var(--color-primary); }
.nw-post-excerpt { font-size: 14px; color: var(--color-text2); margin-bottom: 8px; line-height: 1.6; }
.nw-post-meta { font-size: 12px; color: var(--color-text3); display: flex; align-items: center; gap: 6px; }

/* Single Article */
.nw-article-header { margin-bottom: 20px; }
.nw-article-title { font-size: 28px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.nw-article-meta { font-size: 13px; color: var(--color-text3); display: flex; align-items: center; gap: 6px; }
.nw-meta-cat { color: var(--color-primary); }
.nw-article-thumb { margin-bottom: 24px; border-radius: var(--radius-lg); overflow: hidden; }
.nw-article-body { font-size: 16px; line-height: 1.85; }
.nw-article-body h2 { font-size: 22px; margin: 32px 0 12px; }
.nw-article-body h3 { font-size: 18px; margin: 24px 0 10px; }
.nw-article-body p { margin-bottom: 16px; }
.nw-article-body img { border-radius: var(--radius); margin: 16px 0; }
.nw-article-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.nw-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-tag {
    display: inline-block;
    padding: 3px 12px;
    background: var(--color-bg2);
    border-radius: var(--radius-lg);
    font-size: 12px;
    color: var(--color-text2);
}

/* TOC */
.nw-toc {
    background: var(--color-bg2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.nw-toc-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.nw-toc ul { list-style: none; }
.nw-toc li { padding: 4px 0; }
.nw-toc li a { color: var(--color-text2); font-size: 14px; }
.nw-toc li a:hover { color: var(--color-primary); }
.nw-toc-sub { padding-left: 16px; }

/* Related Posts */
.nw-related { margin-top: 32px; }
.nw-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.nw-related-item { border-radius: var(--radius); overflow: hidden; position: relative; }
.nw-related-item img { width: 100%; height: 120px; object-fit: cover; }
.nw-related-title {
    display: block;
    padding: 8px;
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-bg2);
}

/* Sidebar */
.nw-sidebar {}
.nw-widget { margin-bottom: 24px; background: var(--color-bg2); padding: 16px; border-radius: var(--radius-lg); }
.nw-widget-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--color-primary); }
.nw-popular-list { list-style: none; }
.nw-popular-list li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.nw-popular-list li a { color: var(--color-text2); font-size: 14px; }
.nw-popular-list li a:hover { color: var(--color-primary); }
.nw-widget-cta { text-align: center; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #fff; }
.nw-widget-cta .nw-widget-title { color: #fff; border-color: rgba(255,255,255,0.3); }
.nw-widget-cta p { margin-bottom: 12px; opacity: 0.9; font-size: 14px; }
.nw-widget-cta .nw-btn { background: #fff; color: var(--color-primary); }

/* Footer */
.nw-footer { background: var(--color-bg2); border-top: 1px solid var(--color-border); padding: 40px 0 0; margin-top: 48px; }
.nw-footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.nw-footer-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.nw-footer-placeholder { font-size: 13px; color: var(--color-text3); }
.nw-footer-bottom {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text3);
}
.nw-footer-bottom .nw-container { display: flex; justify-content: space-between; align-items: center; }
.nw-footer-nav { list-style: none; display: flex; gap: 16px; }
.nw-footer-nav a { color: var(--color-text3); font-size: 13px; }

/* Pagination */
.nw-pagination { margin-top: 24px; text-align: center; }
.nw-pagination .nav-links { display: flex; justify-content: center; gap: 4px; }
.nw-pagination a, .nw-pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
}
.nw-pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* 404 */
.nw-404 { text-align: center; padding: 80px 0; }
.nw-404 h1 { font-size: 72px; color: var(--color-primary); margin-bottom: 16px; }
.nw-404 p { font-size: 18px; color: var(--color-text2); margin-bottom: 24px; }

/* Archive */
.nw-archive-header { margin-bottom: 24px; }
.nw-archive-title { font-size: 24px; font-weight: 700; }
.nw-archive-desc { color: var(--color-text2); margin-top: 8px; }

/* Mobile toggle */
.nw-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nw-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 5px 0; transition: var(--transition); }

/* Responsive */
@media (max-width: 968px) {
    .nw-layout-two-col { grid-template-columns: 1fr; }
    .nw-footer-widgets { grid-template-columns: repeat(2, 1fr); }
    .nw-post-thumb { width: 140px; }
}
@media (max-width: 768px) {
    .nw-nav-list, .nw-header-cta { display: none; }
    .nw-menu-toggle { display: block; }
    .nw-post-item { flex-direction: column; }
    .nw-post-thumb { width: 100%; }
    .nw-post-thumb img { height: 180px; }
    .nw-footer-widgets { grid-template-columns: 1fr; }
    .nw-related-grid { grid-template-columns: 1fr; }
    .nw-topbar { display: none; }
}
