/*
Theme Name: portal3
Author: Custom
Version: 1.0
Description: 全新深空灰极简SEO模板 100%新代码无复用
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Microsoft YaHei",sans-serif;
    font-size: 15px;
    color: #e5e7eb;
    background-color: #111827;
    line-height: 1.8;
}
a {
    color: #d1d5db;
    text-decoration: none;
    transition: 0.2s all;
}
a:hover {
    color: #60a5fa;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
ul {
    list-style: none;
}

/* 全局容器 */
.dg-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
@media(max-width:1200px){
    .dg-container { width: 100%; }
}

/* 头部LOGO */
.dg-header {
    background-color: #1f2937;
    padding: 25px 0;
    border-bottom: 1px solid #374151;
}
.dg-logo {
    font-size: 26px;
    font-weight: 600;
    color: #ffffff;
}

/* 面包屑 */
.dg-bread {
    background-color: #1f2937;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 13px;
    color: #9ca3af;
}

/* 主体布局 */
.dg-wrap {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}
.dg-main {
    flex: 1;
}
.dg-side {
    width: 300px;
    flex-shrink: 0;
}
@media(max-width:900px){
    .dg-wrap { flex-direction: column; }
    .dg-side { width: 100%; }
}

/* 文章列表卡片 */
.dg-post-item {
    background-color: #1f2937;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 22px;
    border: 1px solid #374151;
}
.dg-post-thumb {
    width: 185px;
    height: 125px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
}
.dg-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dg-post-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}
.dg-post-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 10px;
}
.dg-post-desc {
    font-size: 14px;
    color: #d1d5db;
}

/* 分页 */
.dg-page {
    text-align: center;
    margin: 40px 0;
}
.dg-page a, .dg-page span {
    display: inline-block;
    padding: 8px 16px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 4px;
    margin: 0 3px;
    color: #ccc;
}
.dg-page .current {
    background: #60a5fa;
    color: #fff;
    border-color: #60a5fa;
}

/* 侧边栏组件 */
.dg-widget {
    background: #1f2937;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid #374151;
    margin-bottom: 20px;
}
.dg-widget h3 {
    font-size: 16px;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 2px solid #60a5fa;
    margin-bottom: 15px;
}
.dg-widget li {
    padding: 7px 0;
    border-bottom: 1px dashed #374151;
}
.dg-widget li:last-child {
    border-bottom: none;
}

/* 内容页样式 */
.dg-single-box {
    background: #1f2937;
    padding: 35px;
    border-radius: 8px;
    border: 1px solid #374151;
}
.dg-single-title {
    font-size: 26px;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #374151;
}
.dg-single-content {
    font-size: 16px;
    line-height: 2.1;
}

/* 上下篇 */
.dg-post-nav {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
}
.dg-post-nav a {
    background: #1f2937;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid #374151;
}

/* 相关文章 */
.dg-related {
    background: #1f2937;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid #374151;
    margin-top: 30px;
}
.dg-related-list a {
    display: block;
    padding: 6px 0;
    border-bottom: 1px dashed #374151;
}

/* 猜你喜欢 四列布局 */
.dg-like-wrap {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
    margin: 35px 0;
}
@media(max-width:900px){
    .dg-like-wrap { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:480px){
    .dg-like-wrap { grid-template-columns: 1fr; }
}
.dg-like-item {
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #374151;
    transition: 0.3s;
}
.dg-like-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px #00000040;
}
.dg-like-thumb {
    height: 120px;
    overflow: hidden;
}
.dg-like-title {
    padding: 12px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dg-like-item a {
    display: block;
}

/* 底部 */
.dg-footer {
    text-align: center;
    padding: 30px 0;
    color: #6b7280;
    font-size: 13px;
    border-top: 1px solid #374151;
    margin-top: 40px;
}
