/**
 * DSH 开源项目商店主题 - 主样式表
 * Modern Light Tech Theme for GitHub Project Store
 */

:root {
    --dsh-primary: #0969da;
    --dsh-primary-hover: #085cc0;
    --dsh-primary-light: #ebf5ff;
    --dsh-primary-glow: rgba(9, 105, 218, 0.12);
    --dsh-bg: #f8fafc;
    --dsh-card-bg: #ffffff;
    --dsh-border: #e2e8f0;
    --dsh-border-subtle: #edf2f7;
    --dsh-text-main: #0f172a;
    --dsh-text-muted: #64748b;
    --dsh-text-light: #94a3b8;
    --dsh-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --dsh-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --dsh-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --dsh-shadow-hover: 0 14px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --dsh-radius-sm: 6px;
    --dsh-radius-md: 10px;
    --dsh-radius-lg: 16px;
    --dsh-radius-pill: 9999px;
    --dsh-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --dsh-font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--dsh-font-sans);
    background-color: var(--dsh-bg);
    color: var(--dsh-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--dsh-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--dsh-primary-hover);
    text-decoration: none;
}

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

.dsh-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .dsh-container {
        padding: 0 14px;
    }
}

/* ================== 顶部导航栏 ================== */
.dsh-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--dsh-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.dsh-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}
@media (max-width: 768px) {
    .dsh-nav-inner {
        height: 58px;
    }
}

.dsh-brand-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dsh-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.18rem;
    color: var(--dsh-text-main);
    text-decoration: none;
    letter-spacing: -0.3px;
}
.dsh-brand:hover {
    color: var(--dsh-primary);
}

.dsh-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #0969da 0%, #1d4ed8 100%);
    color: #ffffff;
    border-radius: var(--dsh-radius-md);
    font-size: 1.15rem;
    box-shadow: 0 2px 6px rgba(9, 105, 218, 0.25);
    flex-shrink: 0;
}

.dsh-brand-icon-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--dsh-radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    border: 1px solid var(--dsh-border);
}

.dsh-brand-icon-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsh-brand-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--dsh-primary-light);
    color: var(--dsh-primary);
    border-radius: 6px;
    font-size: 1rem;
    margin-right: 6px;
}

.dsh-logo-img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.dsh-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--dsh-radius-pill);
    letter-spacing: 0.3px;
}

.dsh-pulse-dot-sm {
    width: 6px;
    height: 6px;
    background: #0284c7;
    border-radius: 50%;
    animation: dshPulse 2s infinite;
}

.dsh-nav-center {
    display: flex;
    align-items: center;
}

.dsh-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 6px;
}

.dsh-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dsh-text-muted);
    border-radius: var(--dsh-radius-pill);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dsh-nav-link:hover {
    color: var(--dsh-primary);
    background: #f1f5f9;
}
.dsh-nav-item.active .dsh-nav-link {
    color: var(--dsh-primary);
    background: var(--dsh-primary-light);
}

.dsh-nav-item {
    position: relative;
}

.dsh-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-md);
    box-shadow: var(--dsh-shadow-lg);
    padding: 6px;
    list-style: none;
    display: none;
    z-index: 1001;
}
.dsh-nav-item:hover .dsh-dropdown-menu {
    display: block;
}
.dsh-dropdown-menu li a {
    display: block;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--dsh-text-main);
    border-radius: var(--dsh-radius-sm);
}
.dsh-dropdown-menu li a:hover {
    background: var(--dsh-bg);
    color: var(--dsh-primary);
}

.dsh-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dsh-nav-search-quick {
    display: none;
}
@media (min-width: 992px) {
    .dsh-nav-search-quick {
        display: block;
    }
}

.dsh-quick-search-form {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--dsh-radius-pill);
    padding: 5px 12px;
    gap: 6px;
    transition: all 0.25s ease;
}
.dsh-quick-search-form:focus-within {
    background: #ffffff;
    border-color: var(--dsh-primary);
    box-shadow: 0 0 0 3px var(--dsh-primary-glow);
    width: 220px;
}
.dsh-quick-search-input {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    outline: none;
    width: 140px;
    color: var(--dsh-text-main);
    transition: width 0.25s ease;
}
.dsh-quick-search-form:focus-within .dsh-quick-search-input {
    width: 160px;
}
.dsh-quick-search-form i {
    color: var(--dsh-text-light);
    font-size: 0.95rem;
}
.dsh-kbd {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--dsh-font-mono);
}

/* 移动端搜索按钮与滑出式搜索栏 */
.dsh-desktop-search {
    display: flex;
}
.dsh-mobile-search-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-sm);
    color: var(--dsh-text-main);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dsh-mobile-search-btn:hover {
    background: var(--dsh-primary-light);
    color: var(--dsh-primary);
    border-color: var(--dsh-primary);
}

@media (max-width: 768px) {
    .dsh-desktop-search {
        display: none !important;
    }
    .dsh-mobile-search-btn {
        display: inline-flex;
    }
}

.dsh-mobile-search-bar {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: #ffffff;
    border-top: 1px solid var(--dsh-border-subtle);
    border-bottom: 1px solid var(--dsh-border);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.dsh-mobile-search-bar.open {
    max-height: 80px;
    opacity: 1;
    visibility: visible;
    padding: 10px 0;
}

.dsh-mobile-search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-pill);
    padding: 6px 14px;
    gap: 8px;
    transition: all 0.2s ease;
}
.dsh-mobile-search-box:focus-within {
    background: #ffffff;
    border-color: var(--dsh-primary);
    box-shadow: 0 0 0 3px var(--dsh-primary-glow);
}
.dsh-mobile-search-icon {
    color: var(--dsh-text-muted);
    font-size: 1.05rem;
}
.dsh-mobile-search-field {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--dsh-text-main);
}
.dsh-mobile-search-close {
    background: none;
    border: none;
    color: var(--dsh-text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    padding: 0 2px;
    display: flex;
    align-items: center;
}
.dsh-mobile-search-close:hover {
    color: var(--dsh-danger);
}

/* ================== 按钮体系 ================== */
.dsh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    border-radius: var(--dsh-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
    line-height: 1.4;
}
.dsh-btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}
.dsh-btn-xs {
    padding: 4px 8px;
    font-size: 0.78rem;
    border-radius: 4px;
}
.dsh-btn-primary {
    background: var(--dsh-primary);
    color: #ffffff !important;
}
.dsh-btn-primary:hover {
    background: var(--dsh-primary-hover);
    box-shadow: 0 2px 6px var(--dsh-primary-glow);
}
.dsh-btn-light {
    background: #f1f5f9;
    color: var(--dsh-text-main) !important;
    border-color: var(--dsh-border);
}
.dsh-btn-light:hover {
    background: #e2e8f0;
}
.dsh-btn-dark {
    background: #24292f;
    color: #ffffff !important;
}
.dsh-btn-dark:hover {
    background: #1b1f24;
}
.dsh-btn-outline {
    background: #ffffff;
    border-color: var(--dsh-border);
    color: var(--dsh-text-main) !important;
}
.dsh-btn-outline:hover {
    border-color: var(--dsh-primary);
    color: var(--dsh-primary) !important;
    background: var(--dsh-primary-light);
}

/* ================== 首页 Hero 与 统计看板 ================== */
.dsh-hero {
    position: relative;
    padding: 48px 0 36px;
    background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--dsh-border);
    overflow: hidden;
}
.dsh-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.35;
    pointer-events: none;
}

.dsh-hero-content {
    position: relative;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.dsh-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 4px 14px;
    border-radius: var(--dsh-radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: var(--dsh-shadow-sm);
    margin-bottom: 16px;
}

.dsh-pulse-dot {
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
    animation: dshPulse 2s infinite;
}
@keyframes dshPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.dsh-hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--dsh-text-main);
    margin-bottom: 10px;
    line-height: 1.25;
}
@media (max-width: 768px) {
    .dsh-hero-title {
        font-size: 1.55rem;
        letter-spacing: -0.4px;
    }
}

.dsh-hero-subtitle {
    font-size: 1rem;
    color: var(--dsh-text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .dsh-hero-subtitle {
        font-size: 0.88rem;
        margin-bottom: 20px;
    }
}

/* 统计卡片网格 */
.dsh-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .dsh-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 22px;
    }
}

.dsh-stat-card {
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--dsh-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dsh-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dsh-shadow-md);
}

.dsh-stat-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 768px) {
    .dsh-stat-icon {
        font-size: 1.3rem;
    }
}

.dsh-stat-info {
    text-align: left;
}

.dsh-stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dsh-text-main);
    line-height: 1.1;
}
@media (max-width: 768px) {
    .dsh-stat-num {
        font-size: 1.05rem;
    }
}

.dsh-stat-num small {
    font-size: 0.85rem;
    color: var(--dsh-primary);
}

.dsh-stat-label {
    font-size: 0.75rem;
    color: var(--dsh-text-muted);
    font-weight: 500;
}

/* 醒目大搜索块 */
.dsh-search-box-large {
    max-width: 740px;
    margin: 0 auto;
    width: 100%;
}

.dsh-hero-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--dsh-border);
    border-radius: var(--dsh-radius-pill);
    padding: 5px 6px 5px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}
.dsh-hero-search-form:focus-within {
    border-color: var(--dsh-primary);
    box-shadow: 0 0 0 4px var(--dsh-primary-glow), 0 10px 25px rgba(0, 0, 0, 0.08);
}

.dsh-search-icon {
    font-size: 1.3rem;
    color: var(--dsh-text-light);
    margin-right: 10px;
    flex-shrink: 0;
}

.dsh-hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--dsh-text-main);
    background: transparent;
    padding: 8px 0;
    min-width: 0;
}

.dsh-search-btn {
    padding: 10px 22px;
    border-radius: var(--dsh-radius-pill);
    font-size: 0.92rem;
    font-weight: 700;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 热门搜索推荐 */
.dsh-hot-keywords {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.82rem;
}
.dsh-hot-title {
    color: var(--dsh-text-muted);
    font-weight: 600;
    flex-shrink: 0;
}
.dsh-hot-pill {
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    color: var(--dsh-text-muted);
    padding: 3px 10px;
    border-radius: var(--dsh-radius-pill);
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.dsh-hot-pill:hover {
    background: var(--dsh-primary-light);
    color: var(--dsh-primary);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

/* 移动端专属大搜索块优化 */
@media (max-width: 768px) {
    .dsh-search-box-large {
        padding: 0 2px;
    }
    .dsh-hero-search-form {
        padding: 4px 4px 4px 12px;
        border-width: 1.5px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    }
    .dsh-search-icon {
        font-size: 1.15rem;
        margin-right: 6px;
    }
    .dsh-hero-search-input {
        font-size: 0.88rem;
        padding: 6px 0;
    }
    .dsh-search-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .dsh-search-btn span {
        display: none !important;
    }
    .dsh-search-btn i {
        font-size: 1.1rem;
        margin: 0;
    }
    .dsh-hot-keywords {
        margin-top: 10px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 2px 8px;
        scrollbar-width: none;
    }
    .dsh-hot-keywords::-webkit-scrollbar {
        display: none;
    }
    .dsh-hot-title {
        font-size: 0.76rem;
    }
    .dsh-hot-pill {
        flex-shrink: 0;
        padding: 2px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .dsh-hero-search-form {
        padding: 3px 3px 3px 10px;
    }
    .dsh-hero-search-input {
        font-size: 0.84rem;
    }
    .dsh-search-btn {
        width: 34px;
        height: 34px;
    }
    .dsh-search-btn i {
        font-size: 1.05rem;
    }
}

/* ================== 主体列表与筛选 ================== */
.dsh-main-container {
    padding: 28px 0 50px;
}

.dsh-filter-bar {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--dsh-border);
    padding-bottom: 14px;
}

.dsh-categories-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .dsh-categories-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }
    .dsh-category-pill {
        flex-shrink: 0;
    }
}

.dsh-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-pill);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--dsh-text-muted);
    transition: all 0.2s ease;
}
.dsh-category-pill:hover {
    background: #f1f5f9;
    color: var(--dsh-text-main);
    border-color: #cbd5e1;
}
.dsh-category-pill.active {
    background: var(--dsh-primary);
    color: #ffffff !important;
    border-color: var(--dsh-primary);
    box-shadow: 0 2px 6px var(--dsh-primary-glow);
}
.dsh-count-badge {
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: var(--dsh-radius-pill);
}
.dsh-category-pill.active .dsh-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ================== 项目卡片网格 ================== */
.dsh-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}
@media (max-width: 768px) {
    .dsh-project-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.dsh-card {
    background: var(--dsh-card-bg);
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-lg);
    box-shadow: var(--dsh-shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dsh-project-grid .dsh-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--dsh-shadow-hover);
    border-color: #cbd5e1;
}

.dsh-card-header {
    padding: 16px 18px 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dsh-avatar-wrap {
    flex-shrink: 0;
}

.dsh-repo-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--dsh-radius-md);
    border: 1px solid var(--dsh-border);
    object-fit: cover;
    background: #f1f5f9;
}

.dsh-header-meta {
    flex: 1;
    min-width: 0;
}

.dsh-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.dsh-repo-title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-repo-title a {
    color: var(--dsh-text-main);
}
.dsh-repo-title a:hover {
    color: var(--dsh-primary);
}

.dsh-owner-text {
    font-size: 0.78rem;
    color: var(--dsh-text-muted);
}

.dsh-card-body {
    padding: 0 18px 14px;
    flex: 1;
}

.dsh-card-desc {
    font-size: 0.86rem;
    color: var(--dsh-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dsh-card-footer {
    padding: 10px 18px;
    background: #fafbfc;
    border-top: 1px solid var(--dsh-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.dsh-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dsh-text-muted);
}

.dsh-metric-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--dsh-text-main);
}

.dsh-lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dsh-metric-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.dsh-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 徽章体系 */
.dsh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}
.dsh-badge-category {
    background: var(--dsh-primary-light);
    color: var(--dsh-primary);
}
.dsh-badge-active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.dsh-badge-archived {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.dsh-badge-top {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ================== 现代化翻页导航与 Ajax 加载更多 ================== */
.dsh-pagination-container {
    margin-top: 36px;
    margin-bottom: 24px;
}

.dsh-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dsh-pagination-wrap span,
.dsh-pagination-wrap a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--dsh-radius-md);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

/* 当前活动页码 (span) */
.dsh-pagination-wrap span {
    background: var(--dsh-primary);
    color: #ffffff;
    border: 1px solid var(--dsh-primary);
    box-shadow: 0 2px 8px var(--dsh-primary-glow);
    cursor: default;
}

/* 可点击页码与上下页链接 (a) */
.dsh-pagination-wrap a {
    background: #ffffff;
    color: var(--dsh-text-main);
    border: 1px solid var(--dsh-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dsh-pagination-wrap a:hover {
    background: #f8fafc;
    color: var(--dsh-primary);
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* “点击加载更多”按钮容器 */
.dsh-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.dsh-btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dsh-text-main);
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-pill);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dsh-btn-load-more:hover {
    color: var(--dsh-primary);
    border-color: var(--dsh-primary);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--dsh-primary-glow);
}

.dsh-btn-load-more.loading {
    pointer-events: none;
    opacity: 0.85;
    background: #f1f5f9;
}

.dsh-btn-load-more.dsh-load-more-done {
    pointer-events: none;
    background: #f8fafc;
    color: var(--dsh-text-muted);
    border-color: var(--dsh-border-subtle);
    box-shadow: none;
}

.dsh-spin {
    animation: dshSpin 1s linear infinite;
}
@keyframes dshSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================== 项目详情页 (echo_log.php) ================== */
.dsh-breadcrumb-wrap {
    background: #ffffff;
    border-bottom: 1px solid var(--dsh-border);
    padding: 8px 0;
    font-size: 0.82rem;
}
.dsh-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--dsh-text-muted);
    white-space: nowrap;
    overflow-x: auto;
}
.dsh-bc-sep {
    color: var(--dsh-text-light);
}
.dsh-bc-current {
    color: var(--dsh-text-main);
    font-weight: 600;
}

.dsh-detail-hero {
    background: #ffffff;
    border-bottom: 1px solid var(--dsh-border);
    padding: 28px 0 24px;
}

.dsh-detail-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 768px) {
    .dsh-detail-header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        margin-bottom: 18px;
    }
}

.dsh-detail-avatar-wrap {
    flex-shrink: 0;
}
.dsh-detail-avatar {
    width: 76px;
    height: 76px;
    border-radius: var(--dsh-radius-lg);
    border: 2px solid var(--dsh-border);
    object-fit: cover;
    box-shadow: var(--dsh-shadow-md);
}
@media (max-width: 768px) {
    .dsh-detail-avatar {
        width: 64px;
        height: 64px;
    }
}

.dsh-detail-title-wrap {
    flex: 1;
    min-width: 0;
}

.dsh-detail-badges-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .dsh-detail-badges-top {
        justify-content: center;
    }
}

.dsh-detail-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--dsh-text-main);
    line-height: 1.2;
    margin-bottom: 4px;
    word-break: break-word;
}
@media (max-width: 768px) {
    .dsh-detail-title {
        font-size: 1.45rem;
    }
}

.dsh-detail-repo-slug {
    font-size: 0.9rem;
    color: var(--dsh-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-family: var(--dsh-font-mono);
}
@media (max-width: 768px) {
    .dsh-detail-repo-slug {
        justify-content: center;
    }
}

.dsh-detail-desc {
    font-size: 0.94rem;
    color: var(--dsh-text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
    word-break: break-word;
}
@media (max-width: 768px) {
    .dsh-detail-desc {
        font-size: 0.88rem;
        margin-bottom: 14px;
    }
}

/* 优化正文页 Action 按钮组 */
.dsh-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .dsh-detail-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

.dsh-btn-action {
    padding: 8px 16px;
    font-size: 0.88rem;
    border-radius: var(--dsh-radius-md);
    box-shadow: var(--dsh-shadow-sm);
    transition: all 0.2s ease;
}
.dsh-btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--dsh-shadow-md);
}

/* 核心指标统计 Bar */
.dsh-metrics-bar {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    background: #f8fafc;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}
@media (max-width: 992px) {
    .dsh-metrics-bar {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 576px) {
    .dsh-metrics-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dsh-metric-box {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid var(--dsh-border);
    border-bottom: 1px solid var(--dsh-border);
}
@media (min-width: 993px) {
    .dsh-metric-box {
        border-bottom: none;
    }
}
.dsh-metric-box:last-child {
    border-right: none;
}
.dsh-metric-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dsh-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.dsh-metric-lbl {
    font-size: 0.72rem;
    color: var(--dsh-text-muted);
    margin-top: 2px;
}

/* 一键安装指令栏 */
.dsh-install-box {
    background: #0f172a;
    border-radius: var(--dsh-radius-md);
    padding: 10px 14px;
    color: #f8fafc;
    box-shadow: var(--dsh-shadow-md);
}

.dsh-install-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.dsh-install-title {
    font-size: 0.84rem;
    color: #94a3b8;
}

.dsh-install-tabs {
    display: flex;
    gap: 4px;
}
.dsh-tab-btn {
    background: #1e293b;
    border: none;
    color: #94a3b8;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.dsh-tab-btn.active, .dsh-tab-btn:hover {
    background: var(--dsh-primary);
    color: #ffffff;
}

.dsh-cmd-pane {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #090d16;
    border-radius: var(--dsh-radius-sm);
    padding: 8px 12px;
}
.dsh-cmd-pane.active {
    display: flex;
}
@media (max-width: 576px) {
    .dsh-cmd-pane.active {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

.dsh-cmd-code {
    font-family: var(--dsh-font-mono);
    font-size: 0.85rem;
    color: #38bdf8;
    word-break: break-all;
}

.dsh-copy-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: var(--dsh-radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
    transition: all 0.2s;
}
.dsh-copy-btn:hover {
    background: #334155;
    color: #ffffff;
}
@media (max-width: 576px) {
    .dsh-copy-btn {
        margin-left: 0;
        width: 100%;
        padding: 6px;
    }
}

/* ================== 详情页主体双栏布局 ================== */
.dsh-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 30px;
    align-items: flex-start;
}
@media (max-width: 992px) {
    .dsh-detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.dsh-detail-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.dsh-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.dsh-readme-card {
    border-radius: var(--dsh-radius-md);
}

.dsh-readme-header {
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--dsh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dsh-readme-title {
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dsh-branch-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--dsh-font-mono);
}

.dsh-readme-content {
    padding: 22px;
}
@media (max-width: 768px) {
    .dsh-readme-content {
        padding: 14px;
    }
}

.dsh-readme-footer {
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid var(--dsh-border);
}
.dsh-topics-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.dsh-topics-label {
    font-size: 0.82rem;
    color: var(--dsh-text-muted);
    font-weight: 600;
}
.dsh-topic-pill {
    background: var(--dsh-primary-light);
    color: var(--dsh-primary);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--dsh-radius-pill);
}
.dsh-topic-pill:hover {
    background: #dbeafe;
}

/* 侧边栏 Facts 卡片 */
.dsh-sidebar-card-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--dsh-border);
}
.dsh-sidebar-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dsh-facts-list {
    list-style: none;
}
.dsh-fact-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--dsh-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
}
.dsh-fact-item:last-child {
    border-bottom: none;
}
.dsh-fact-key {
    color: var(--dsh-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.dsh-fact-val {
    color: var(--dsh-text-main);
    text-align: right;
}

/* TOC 目录导航 */
.dsh-toc-list {
    padding: 10px 14px;
    max-height: 360px;
    overflow-y: auto;
}
.dsh-toc-link {
    display: block;
    padding: 4px 8px;
    font-size: 0.82rem;
    color: var(--dsh-text-muted);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsh-toc-link:hover, .dsh-toc-link.active {
    color: var(--dsh-primary);
    background: var(--dsh-primary-light);
}
.dsh-toc-link.toc-h3 {
    padding-left: 18px;
    font-size: 0.78rem;
}

/* 同类推荐列表 */
.dsh-related-list {
    display: flex;
    flex-direction: column;
}
.dsh-related-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--dsh-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--dsh-text-main);
    transition: background 0.2s;
}
.dsh-related-item:last-child {
    border-bottom: none;
}
.dsh-related-item:hover {
    background: #f8fafc;
}
.dsh-related-title {
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.dsh-related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--dsh-text-muted);
}
.dsh-related-arrow {
    color: var(--dsh-text-light);
    font-size: 1rem;
}

/* 邻近项目导航 */
.dsh-neighbor-wrap {
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.dsh-neighbor-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 576px) {
    .dsh-neighbor-nav {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
.dsh-neighbor-prev, .dsh-neighbor-next {
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-md);
    padding: 16px 20px;
    box-shadow: var(--dsh-shadow-sm);
    transition: all 0.2s ease;
}
.dsh-neighbor-prev:hover, .dsh-neighbor-next:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--dsh-shadow-md);
}
.dsh-neighbor-label {
    display: block;
    font-size: 0.78rem;
    color: var(--dsh-text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.dsh-neighbor-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dsh-text-main);
    line-height: 1.35;
}

/* 侧边栏卡片 */
.dsh-detail-sidebar .dsh-card {
    margin-bottom: 0 !important;
    border-radius: var(--dsh-radius-md);
    box-shadow: var(--dsh-shadow-sm);
    transition: all 0.2s ease;
}
.dsh-detail-sidebar .dsh-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--dsh-shadow-md);
}

/* ================== 极简轻量页脚 (Footer Simple) ================== */
.dsh-footer-simple {
    background: #ffffff;
    border-top: 1px solid var(--dsh-border);
    padding: 28px 0 24px;
    margin-top: 40px;
}

.dsh-footer-disclaimer {
    background: #f8fafc;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-md);
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--dsh-text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
    text-align: center;
}

.dsh-footer-simple-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--dsh-text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

.dsh-footer-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.dsh-footer-meta a {
    color: var(--dsh-text-main);
}
.dsh-footer-meta a:hover {
    color: var(--dsh-primary);
}

.dsh-footer-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dsh-icp-link {
    color: var(--dsh-text-muted) !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dsh-icp-link:hover {
    color: var(--dsh-primary) !important;
}

.dsh-back-to-top {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid var(--dsh-border);
    color: var(--dsh-text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dsh-back-to-top:hover {
    background: var(--dsh-primary);
    color: #ffffff;
    border-color: var(--dsh-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--dsh-primary-glow);
}

.dsh-divider {
    margin: 0 8px;
    color: #cbd5e1;
}

/* ================== 全局 Toast 提示 ================== */
.dsh-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 9px 16px;
    border-radius: var(--dsh-radius-pill);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dsh-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dsh-toast-icon {
    color: #22c55e;
    font-size: 1.1rem;
}

/* ================== 空状态 ================== */
.dsh-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #ffffff;
    border: 1px solid var(--dsh-border);
    border-radius: var(--dsh-radius-lg);
}
.dsh-empty-icon {
    font-size: 3rem;
    color: var(--dsh-text-light);
    margin-bottom: 10px;
}
.dsh-empty-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.dsh-empty-desc {
    color: var(--dsh-text-muted);
    margin-bottom: 16px;
    font-size: 0.88rem;
}
