/* Gree Resource Center - 阶梯缩进版 */

:root {
    --gree-primary: var(--wp--preset--color--primary, #0062a8);
    --gree-text: var(--wp--preset--color--foreground, #333);
}

/* 容器基础设置 */
.gree-explorer-container { 
    max-width: 100%; 
    margin: 20px 0; 
    background: transparent;
    font-family: inherit;
    color: var(--gree-text); 
}

/* --- 层级右移核心逻辑 --- */

/* 每一层文件夹展开后，内部所有内容整体向右移动 25px */
.gree-folder-content { 
    padding-left: 25px !important; 
    border-left: none !important; /* 确保没有边框线 */
}

/* 文件夹节点样式 */
.gree-folder-node { 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}

.gree-folder-summary { 
    padding: 15px 10px; 
    cursor: pointer; 
    list-style: none; 
    display: flex !important; 
    align-items: center !important; 
    color: #515151;
    font-family: "Roboto", Sans-serif;
    font-size: 20px; /* 稍微微调，保持层级清晰 */
    font-weight: 600;
    line-height: 26px;
}

.gree-folder-summary::-webkit-details-marker { display: none; }

.gree-summary-left { 
    display: flex !important; 
    align-items: center !important; 
    gap: 12px !important; 
}

.gree-folder-summary .arrow-icon { 
    font-size: 14px; 
    color: var(--gree-primary); 
    transition: transform 0.3s ease; 
}

/* 展开时箭头旋转 */
.gree-folder-node[open] > .gree-folder-summary .arrow-icon { 
    transform: rotate(90deg); 
}

/* --- 文件行布局 --- */

.gree-file-row { 
    display: flex !important; 
    flex-direction: row !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    padding: 12px 10px; 
    border-top: 1px solid rgba(0,0,0,0.03); 
}

.gree-file-info { 
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center !important; 
    gap: 15px !important; 
    flex: 1; 
}

.gree-icon { 
    font-size: 22px !important; 
    color: #888; 
    width: 22px !important;
    height: 22px !important;
    display: inline-block !important;
}

.gree-file-text { 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: flex-start !important;
    gap: 2px !important;
}

.gree-f-name { 
    font-size: 14px; /* 适当缩小文件名，让多级嵌套时不显拥挤 */
    color: #333;
}

.gree-f-meta { 
    font-size: 11px; 
    opacity: 0.7; 
    display: block !important;
}

/* 下载按钮样式 */
.gree-download-btn { 
    display: inline-flex !important; 
    align-items: center !important; 
    gap: 8px !important; 
    text-decoration: none !important; 
    font-size: 12px; 
    font-weight: bold; 
    color: var(--gree-primary) !important; 
    border: 2px solid var(--gree-primary); 
    padding: 6px 16px; 
    border-radius: 50px; 
    transition: all 0.3s ease; 
    white-space: nowrap; 
}

.gree-download-btn:hover { 
    background: var(--gree-primary); 
    color: #fff !important; 
}

/* 响应式适配 */
@media (max-width: 600px) { 
    .gree-folder-content {
        padding-left: 15px !important; /* 手机端缩进减小，防止内容被挤出屏幕 */
    }
    .gree-file-row { 
        flex-direction: column !important; 
        align-items: flex-start !important; 
        gap: 15px !important; 
    } 
    .gree-download-btn { 
        width: 100%; 
        justify-content: center !important; 
    } 
}

.spin {
    animation: gree-spin 1.5s infinite linear;
    display: inline-block;
}
@keyframes gree-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.gree-loading-spinner {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}