/* ==========================================================
   Pudiu-pro+ 独立模块样式 (导航/友链 & 项目展示)
   存放路径: /assets/css/modules.css
========================================================== */

/* ==========================================================
   1. 导航/友链模块 (Link Directory)
   ========================================================== */
/* 胶囊导航 */
.dir-sticky-nav-wrap::-webkit-scrollbar { display: none; }
.dir-nav-pill { display: inline-block; padding: 8px 20px; background: rgba(0,0,0,0.04); border-radius: 50px; font-size: 14px; font-weight: 600; color: #666; text-decoration: none; transition: all 0.3s ease; white-space: nowrap; }
.dir-nav-pill:hover, .dir-nav-pill.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(255,70,85,0.2); }

/* 卡片基础与过渡 */
.dir-card-item { padding: 15px 20px; transition: transform 0.2s, border-color 0.2s; border: 1px solid transparent; }
.dir-card-item:hover { border-color: rgba(255,70,85,0.2); transform: translateY(-3px); }
.dir-view-more { font-size: 13px; font-weight: 600; color: #888; text-decoration: none; transition: 0.2s; }
.dir-view-more:hover { color: var(--accent); }

/* 核心看板容器 */
.premium-board-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; padding: 25px; box-shadow: 0 8px 30px rgba(0,0,0,0.03); position: relative; overflow: hidden; margin-bottom: 30px; scroll-margin-top: 90px; width: 100%; box-sizing: border-box; min-width: 0; }
.premium-board-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--accent), #ff9ca5, #ffeb3b); opacity: 0.8; }
.dir-board-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px dashed var(--border); padding-bottom: 15px; }
.dir-board-title { margin: 0; font-size: 18px; font-weight: 800; border-left: 4px solid var(--accent); padding-left: 12px; line-height: 1.2; color: var(--text-main); }

/* 最新与点入网格 (自适应防挤压) */
.dir-clicks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.dir-new-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

/* 微型卡片 */
.dir-mini-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; border: 1px solid var(--border); border-radius: 8px; transition: all 0.2s; background: rgba(0,0,0,0.01); min-width: 0; width: 100%; box-sizing: border-box; }
.dir-mini-card:hover { border-color: rgba(255,70,85,0.3); background: rgba(255,70,85,0.04); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.dir-mini-card .mini-icon { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.dir-mini-card .mini-title { font-size: 13px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; display: block; }

/* 排行榜双栏布局 */
.dir-split-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 25px; margin-bottom: 40px; align-items: start; width: 100%; box-sizing: border-box; }
.dir-split-left { scroll-margin-top: 90px; min-width: 0; margin-bottom: 0; }
.dir-split-right { scroll-margin-top: 90px; min-width: 0; margin-bottom: 0; }

/* 密集列表项 (访问排行) */
.dir-dense-list { display: flex; flex-direction: column; gap: 8px; }
.dense-item { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background 0.2s; min-width: 0; width: 100%; box-sizing: border-box;}
.dense-item:hover { background: rgba(0,0,0,0.03); }
.dense-rank { width: 22px; height: 22px; text-align: center; line-height: 22px; font-size: 12px; font-weight: 800; color: #999; background: rgba(0,0,0,0.05); border-radius: 4px; flex-shrink: 0; font-style: italic; }
.dense-item:nth-child(1) .dense-rank { background: #ff4655; color: #fff; }
.dense-item:nth-child(2) .dense-rank { background: #ff7680; color: #fff; }
.dense-item:nth-child(3) .dense-rank { background: #ff9ca5; color: #fff; }
.dense-item .dense-icon { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; }
.dense-item .dense-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; display: block; }
.dense-item .dense-stat { font-size: 12px; color: #999; flex-shrink: 0; }

@media (max-width: 1200px) { 
    .dir-split-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 20px;}
}
@media (max-width: 992px) { 
    .dir-split-layout { grid-template-columns: minmax(0, 1fr); } 
}

/* 导航详情页专属 */
.meta-value.expired { color: #f59e0b; display: flex; align-items: center; gap: 4px; }
.fl-copy-btn { position: absolute; right: 10px; top: 10px; background: var(--accent); color: #fff; border: none; padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.fl-copy-btn:hover { background: #e03e4d; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(255,70,85,0.2); }


/* ==========================================================
   2. 项目展示模块 (Project Showcase)
   ========================================================== */

/* 【核心隔离】：仅当 body 具有 single-project 类名时才重置框架，防止污染其他页面 */
body.single-project .pudiu-content-wrapper { padding: 0 !important; grid-template-columns: minmax(0, 1fr) !important; background: var(--bg-main); }
body.single-project .pudiu-right-sidebar { display: none !important; }

@media (max-width: 1024px) { 
    body.single-project .pudiu-content-wrapper { padding-top: 64px !important; } 
}

.project-hero-banner { box-sizing: border-box; width: 100%; overflow: hidden; }
.ph-title { word-break: break-word; overflow-wrap: break-word; hyphens: auto; }
.breadcrumbs { min-width: 0; word-break: break-word; }

.project-body-container { 
    display: grid; 
    grid-template-columns: minmax(0, 1fr) 340px; 
    gap: 40px; 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 30px; 
    box-sizing: border-box;
    width: 100%;
}
.pb-content-left { min-width: 0; box-sizing: border-box; width: 100%; }
.pb-sidebar-right { min-width: 0; box-sizing: border-box; width: 100%; position: sticky; top: 100px; height: max-content; }

@media (max-width: 992px) {
    .project-body-container { 
        grid-template-columns: minmax(0, 1fr); 
        padding: 0 20px;
        gap: 30px;
    }
    .pb-content-left { order: 2; }
    .pb-sidebar-right { order: 1; position: relative; top: 0; }
}